Tools

What does this error mean?

Paste it below, or find it in the list. The common ones from discord.py, discord.js and JDA, with the fix.

discord.py

discord.errors.PrivilegedIntentsRequired

What it means. The code asks for a privileged intent (Message Content, Server Members or Presence) that is switched off for your application.

The fix. Switch it on in the Developer Portal: your application, Bot, Privileged Gateway Intents. Or stop asking for it in the code. Which ones you need.

discord.js

Error [DisallowedIntents]: Privileged intent provided is not enabled or whitelisted.

What it means. The same thing in discord.js: a privileged intent in the code is switched off in the portal. Close code 4014 means the same.

The fix. Switch it on under Bot, Privileged Gateway Intents, or remove it from the intents list. Which ones you need.

discord.py

discord.errors.LoginFailure: Improper token has been passed.

What it means. Discord refused the token. Usually it is not the bot token at all (the client secret is a common mix-up), it has quotes or a space in it, or it was reset.

The fix. Make a new one on the Bot page with Reset Token and paste it into your server's settings without quotes.

discord.js

Error [TokenInvalid]: An invalid token was provided.

What it means. Discord refused the token, or none reached the code (an empty environment variable gives the same error).

The fix. Check the variable name your code reads matches the one you set, then reset the token if it still fails.

discord.py

TypeError: Client.__init__() missing 1 required keyword-only argument: 'intents'

What it means. discord.py 2 requires intents; code written for version 1 does not pass them.

The fix. Create the client with intents=discord.Intents.default(). Upgrading to discord.py 2.

discord.js

TypeError [ClientMissingIntents]: Valid intents must be provided for the Client.

What it means. discord.js 14 requires an intents list when the client is created.

The fix. Pass intents: [GatewayIntentBits.Guilds] at least. Upgrading to discord.js 14.

both

403 Forbidden (error code: 50013): Missing Permissions / DiscordAPIError[50013]

What it means. The bot is not allowed to do that here: the permission is missing in that channel, or the role it is acting on sits above the bot's own role.

The fix. Give the bot's role the permission (and check the channel's own overrides). To manage roles or members, drag the bot's role above theirs in Server Settings, Roles.

both

403 Forbidden (error code: 50001): Missing Access / DiscordAPIError[50001]

What it means. The bot cannot see that channel or server at all. When syncing slash commands to a server, it usually means the bot was invited without the applications.commands scope.

The fix. Give the bot View Channels there, or invite it again with both scopes. Build the invite link.

both

404 Not Found (error code: 10062): Unknown interaction / DiscordAPIError[10062]

What it means. The bot answered a slash command or button after Discord's three seconds were up, so the interaction had expired. People see "The application did not respond".

The fix. Answer first and work after: await interaction.response.defer() in discord.py, await interaction.deferReply() in discord.js, then send the result as a follow-up.

discord.js

DiscordAPIError[40060]: Interaction has already been acknowledged.

What it means. The code replied to the same interaction twice. In discord.py the same mistake raises InteractionResponded.

The fix. Reply once; after that, use followUp() or editReply() (discord.js) or interaction.followup.send() (discord.py).

both

400 Bad Request (error code: 50035): Invalid Form Body / DiscordAPIError[50035]

What it means. Something sent to Discord broke a limit: an embed field over 1,024 characters, a description over 4,096, more than 25 fields, or a command name with capitals or spaces.

The fix. The rest of the error names the field. Shorten it, or split it across messages. Embed limits.

both

429 Too Many Requests / We are being rate limited

What it means. The bot sent requests faster than Discord allows. The libraries wait and retry by themselves; a lot of these means the code is doing something in a tight loop.

The fix. Find what repeats: sending or editing in a loop, reacting or changing roles in bulk, or registering slash commands on every start. Space those out, sync commands only when they change, and never retry instantly in your own code. More on rate limits.

discord.py

ModuleNotFoundError: No module named 'discord'

What it means. The library is not installed where the bot runs.

The fix. Add discord.py to requirements.txt; it is installed on the next start. If it is there, check the name: the package is discord.py, the import is discord.

Python

ModuleNotFoundError: No module named '…'

What it means. A package the code imports is not installed.

The fix. Add it to requirements.txt (the name you would pip install, which is not always the import name) and restart.

Node.js

Error: Cannot find module '…'

What it means. A package is missing, or the path to one of your own files is wrong.

The fix. For a package, add it to dependencies in package.json; it is installed on the next start. For your own file, check the path and its capital letters: Linux treats Bot.js and bot.js as different files.

Node.js

SyntaxError: Cannot use import statement outside a module

What it means. The code uses import, but Node.js is reading it as CommonJS.

The fix. Add "type": "module" to package.json, or use require() instead of import.

Node.js

Error: listen EADDRINUSE: address already in use

What it means. The app tried to listen on a port something else already uses, or a port that is not yours.

The fix. Listen on the port in the SERVER_PORT environment variable (the one on your server's Network tab). Running a web server.

hosting

Killed / exit code 137 / JavaScript heap out of memory

What it means. The bot used all the memory its plan has and was stopped.

The fix. Look for a cache or list that only grows. If the bot simply needs more, a bigger plan has room: how much memory a bot needs.

Java

UnsupportedClassVersionError: … class file version 65.0

What it means. The jar was built for a newer Java than the one running it. 61 is Java 17, 65 is Java 21, 69 is Java 25.

The fix. Pick the matching Java version for your server, or build for the older one (release in your build file).

JDA

net.dv8tion.jda.api.exceptions.InvalidTokenException

What it means. JDA's way of saying Discord refused the token.

The fix. Reset the token on the Bot page and set it again.

hosting

ECONNRESET / getaddrinfo ENOTFOUND discord.com / ClientConnectorError

What it means. The connection to Discord dropped or its address could not be looked up for a moment. Both libraries reconnect by themselves.

The fix. Once in a while, ignore it. If it keeps happening, check the status page and Discord's own, and tell us.

both

The bot is online but does nothing

What it means. Usually the Message Content intent is off (prefix commands see empty messages), slash commands were never synced, or the bot cannot see the channel.

The fix. Step by step.

Press / or Ctrl K on any page to search.