Delete Channel

ORCAcode discord_delete_channel(struct discord *client, u64_snowflake_t channel_id, struct discord_channel *ret)

Delete a channel, or close a private message.

Note

Requires the MANAGE_CHANNELS permission for the guild, or MANAGE_THREADS if the channel is a thread

Note

Deleting a category does not delete its child channels; they will have their parent_id removed and a Channel Update Gateway event will fire for each of them

Note

Fires a Channel Delete event (or Thread Delete if the channel was a thread)

Parameters
  • client – the client created with discord_init()

  • channel_id – the channel to be deleted

  • ret – if successful, a discord_channel that should be free’d with discord_channel_cleanup()

Returns

ORCAcode for how the operation went, ORCA_OK means nothing out of the ordinary