Common Discord bot errors and how to read them
Disabled intents (4014), rate limit (429), EAI_AGAIN, invalid token: what each error means and what to check first.
Most Discord bot failures come down to four errors. Each has a precise cause, and the order of checks matters: the token and the intents take two minutes to verify, the rate limit calls for reviewing the send loop, and EAI_AGAIN affects the network rather than your code.
- Error 4014: a privileged intent is requested but not enabled in the portal.
- Error 429: too many sends too fast. Wait for the delay Discord gives.
- EAI_AGAIN: a DNS resolution failure on the network side, not in your code.
- Invalid token: LoginFailure or “invalid token”, to fix in the variable.
Disabled intents: error 4014
Error 4014 (Disallowed intents) means the bot requests a privileged intent, such as reading message content, without having enabled it in the developer portal. Discord then refuses the connection.
- Open the developer portal, Bot section, and enable the privileged intents your code uses.
- Request only the intents you need in the code: each unnecessary intent is one more permission to enable.
- After a change, restart the bot. A restart without changes reproduces the same error.
Rate limit: error 429
Code 429 (Too Many Requests) means the bot exceeded the pace Discord allows, often because it sends or edits messages in a loop. The response then says how long to wait.
- discord.js and discord.py wait by themselves for most requests, but an endless send loop never stops.
- Space out repeated actions: one message every few seconds is better than a burst.
- Respect the wait time given, and do not restart the bot in a loop during that time.
Network: EAI_AGAIN and ECONNRESET
EAI_AGAIN means Discord’s domain name could not be resolved. ECONNRESET means the connection was cut midway. These errors come from the network between the server and Discord, not from a line of your code.
- If the error appears intermittently, most libraries retry the connection with a growing delay.
- DNS or connection interruptions are known and being fixed. If your code is correct and the error persists, contact support with the exact time.
- An isolated error is often temporary: wait a few minutes before changing anything.
Invalid token: LoginFailure
An invalid, expired or reset token makes the connection fail at startup. The message is often Improper token has been passed in Python, or An invalid token was provided in Node.js.
- Check that the variable contains the token, with no extra space or quotes.
- If the token was reset in the portal, the old value no longer works: copy the new one.
- Never paste the token into a message to have it checked.
Why ACLClouds for your bots
Token and intent errors are fixed in the code and in the Discord portal. The free plan gives your bot a dedicated space where you can fix the code and redeploy it.
- Free plan: 1 bot, 315 MB of RAM, 0.25 vCPU, 715 MB of storage.
- SFTP access per bot on port 2222, to fix the code and redeploy it.
- ffmpeg, yt-dlp and deno included in the Node.js and Python images.
Frequently asked questions
Can a bot be blocked for a 429 error?
A 429 error is a temporary limit, not a penalty. But repeatedly ignoring the waits can lead to a longer block on Discord’s side. Fix the loop.
My bot was online yesterday and is not today. Why?
Read the logs first: a token error, a disabled intent or a network cut leaves a trace. Also check the free plan’s end date: 4 days, renewable from the bot page in the 2 days before it ends, or once suspended.
Why does EAI_AGAIN only appear sometimes?
A DNS resolution that fails intermittently often comes from the network. Retry after a pause, and if the error persists with correct code, contact support with the exact time of the error.