Discord error 50008: Cannot send messages in a non-text channel
Last verified against Discord Developer Docs - Opcodes and status codes
Cannot send messages in a non-text channelWhat error 50008 means
The channel ID you posted to is a type that does not accept messages directly: a category (type 4), a forum (15) or media (16) channel (you post into threads inside them, not into the channel itself), a stage channel in some configurations, or a directory channel. Voice channels have supported text chat for a while, so they are no longer the main cause, but older code that treated every "channel" as postable still trips here.
The usual bug is iterating over guild.channels and sending to each, or letting users pick a destination channel without filtering by type. For forum channels specifically, you must create a thread with an initial message (POST /channels/{id}/threads with a message object) rather than sending to the forum's own ID.
What it looks like
{
"message": "Cannot send messages in a non-text channel",
"code": 50008
}Why it happens
- Sending to a category channel ID
- Sending directly to a forum or media channel instead of creating a thread in it
- User-selected channel option not restricted by channel_types
- Channel type changed after your bot cached its ID
How to fix Discord error 50008
- 1Check channel.type before sending; allow 0 (text), 2 (voice text), 5 (announcement), 10/11/12 (threads), 13 (stage) as appropriate
- 2For forum/media channels, use POST /channels/{channel.id}/threads with name and message to start a post
- 3On slash command CHANNEL options, set channel_types to the postable types so users cannot pick a category
- 4Refresh channel data from GET /channels/{id} if your cache might be stale
How to stop it recurring
Centralize "where can the bot post" logic in one helper that filters by channel type and by the bot's effective permissions, and use it both for command option validation and for background sends. Store the channel type next to stored channel IDs.
Channel types keep growing, so a capability table beats scattered if-statements. The forum-post creation shape (thread plus starter message) has its own webhook variant with its own error, 220003; channel-type fields and thread rules are on the Discord limits page.
Official reference: Discord Developer Docs - Opcodes and status codes. See all Discord error codes or the Discord limits and quotas.
Related codes
- 50024: Cannot execute action on this channel typeCannot execute action on this channel type
- 50003: Cannot execute action on a DM channelCannot execute action on a DM channel
- 220003: Webhooks can only create threads in forum channelsWebhooks can only create threads in forum channels
- 10003: Unknown channelUnknown channel
Error 50008 - quick answers
What does Discord error 50008 mean?
The channel ID you posted to is a type that does not accept messages directly: a category (type 4), a forum (15) or media (16) channel (you post into threads inside them, not into the channel itself), a stage channel in some configurations, or a directory channel.
How do I fix Discord error 50008?
1. Check channel.type before sending; allow 0 (text), 2 (voice text), 5 (announcement), 10/11/12 (threads), 13 (stage) as appropriate 2. For forum/media channels, use POST /channels/{channel.id}/threads with name and message to start a post 3. On slash command CHANNEL options, set channel_types to the postable types so users cannot pick a category 4. Refresh channel data from GET /channels/{id} if your cache might be stale
Should I retry after error 50008?
No. Retrying the same request produces the same error; the condition has to be fixed first. Treat it as a permanent failure for that message and surface it, rather than looping.
Stop debugging Discord by hand
Connect the channel through Conferbot: tokens, webhooks and retries are handled, failures show as readable status.