Discord error 40004: Send messages temporarily disabled
Last verified against Discord Developer Docs - Opcodes and status codes
Send messages has been temporarily disabledWhat error 40004 means
Discord has temporarily stopped the authenticated account from sending messages. This is a restriction on the sender, not on a particular channel, and it is not something a server's permission settings can cause or fix. Discord does not publish the rules behind it.
For bots, reports cluster around behavior that looks like spam to Discord's anti-abuse systems: sending many messages or DMs in a short time, mass-mentioning, or repeating identical content across many channels or users. A bot that floods DMs during an announcement is a classic case. Because the restriction is temporary, the same code that failed may succeed later without any change.
Do not treat 40004 as a cue to retry in a tight loop. Retrying the same burst is the behavior that triggered it. Unlike a normal 429, there is no retry_after telling you when the restriction lifts.
What it looks like
{
"message": "Send messages has been temporarily disabled",
"code": 40004
}Why it happens
- Burst of DMs or messages to many users or channels in a short time
- Repeated identical content posted across many places
- Mass mentions in bot output
- Account-level action taken by Discord's anti-spam systems
How to fix Discord error 40004
- 1Stop the sending job immediately and do not retry in a loop
- 2Check which feature was sending at the time and how many messages it sent per minute
- 3Wait, then send a single test message to confirm the restriction has lifted
- 4Reduce volume: post one announcement in a channel instead of DMing every member
- 5If the restriction does not lift, contact Discord support from the bot owner's account
How to stop it recurring
Design messaging features so a single command cannot fan out into hundreds of sends. Throttle bulk DMs well below the published rate limits and prefer channel announcements. The documented REST rate limits are on the Discord limits page; 40004 sits outside them.
Official reference: Discord Developer Docs - Opcodes and status codes. See all Discord error codes or the Discord limits and quotas.
Related codes
- 40003: Opening direct messages too fastYou are opening direct messages too fast
- 429: HTTP 429 Too Many Requests (rate limited)You are being rate limited.
- 50007: Cannot send messages to this userCannot send messages to this user
- 20028: Channel write rate limitThe write action you are performing on the channel has hit the write rate limit
Error 40004 - quick answers
What does Discord error 40004 mean?
Discord has temporarily stopped the authenticated account from sending messages. This is a restriction on the sender, not on a particular channel, and it is not something a server's permission settings can cause or fix. Discord does not publish the rules behind it.
How do I fix Discord error 40004?
1. Stop the sending job immediately and do not retry in a loop 2. Check which feature was sending at the time and how many messages it sent per minute 3. Wait, then send a single test message to confirm the restriction has lifted 4. Reduce volume: post one announcement in a channel instead of DMing every member 5. If the restriction does not lift, contact Discord support from the bot owner's account
Stop debugging Discord by hand
Connect the channel through Conferbot: tokens, webhooks and retries are handled, failures show as readable status.