Nostrum.Api.delete_channel
You're seeing just the function
delete_channel
, go back to Nostrum.Api module for more information.
Specs
delete_channel( Nostrum.Struct.Channel.id(), Nostrum.Struct.Guild.AuditLogEntry.reason() ) :: error() | {:ok, Nostrum.Struct.Channel.t()}
Deletes a channel.
An optional reason
can be provided for the guild audit log.
If deleting a Nostrum.Struct.Channel.guild_channel/0
, this endpoint requires
the MANAGE_CHANNELS
permission. It fires a
Nostrum.Consumer.channel_delete/0
. If a Nostrum.Struct.Channel.channel_category/0
is deleted, then a Nostrum.Consumer.channel_update/0
event will fire
for each channel under the category.
If successful, returns {:ok, channel}
. Otherwise, returns a Nostrum.Api.error/0
.
Examples
Nostrum.Api.delete_channel(421533712753360896)
{:ok, %Nostrum.Struct.Channel{id: 421533712753360896}}