channel_delete
channel_delete removes a channel from the channel list and deletes its stored messages. It can’t be undone.
Request
Section titled “Request”{ "cmd": "channel_delete", "name": "old-announcements"}| Field | Type | Required | Description |
|---|---|---|---|
name |
string | Yes | Name of the channel or separator. If no channel matches exactly, the server tries a case-insensitive match and deletes the first one it finds. |
Deleting a channel also:
- deletes the channel’s message history,
- deletes the polls posted in the channel and in its threads,
- clears the channel’s voice state.
Response
Section titled “Response”{ "cmd": "channel_delete", "val": true }Before this reply, every logged-in connection, including yours, receives a fresh channels_get list without the channel. Drop any cached messages, threads, or unread state for it. The deletion is also recorded in the audit log.
Permissions
Section titled “Permissions”Requires the manage_channels server permission. Without it the server returns Access denied: 'manage_channels' permission required. A user in a timeout gets a rate_limit frame instead.
Errors
Section titled “Errors”val |
When |
|---|---|
Channel not found |
No channel matches name, even ignoring case. |
Failed to delete channel '<name>' |
The server could not remove the channel or its stored data. |
A validation message is returned when name is missing or empty.
