Fix Discord bot slash command and intents errors
Most Discord bot setup problems come from three places: intents, command registration and invite permissions. Work through the list below before changing your code.
Error: PrivilegedIntentsRequired or disallowed intents
Your code asks for an intent that is not switched on in the Developer Portal. Open your application, go to the Bot page, and enable the Privileged Gateway Intents you use, such as Server Members or Message Content. Then restart the bot. Only request intents you actually need.
Bot ignores normal messages
Reading message text requires the Message Content intent. It must be turned on both in the Developer Portal and in your code. Slash commands do not need it, so consider moving to slash commands where possible.
Slash commands do not appear
- Make sure the bot was invited with the applications.commands scope as well as the bot scope. If not, re-invite it using a fresh link.
- Confirm your code actually syncs or registers the commands. In discord.py this is a separate sync step, and in discord.js it is a deploy script or registration call.
- Guild (single server) commands generally show up quickly, while global commands can take longer to appear. Use guild commands while testing.
- Restart your Discord client if the list looks stale.
Error: Missing Access (50001) or Missing Permissions (50013)
Missing Access usually means the bot is not in that server or cannot see that channel. Missing Permissions means the bot role lacks a permission the action needs. Check the bot role position, since a bot cannot manage roles higher than its own.
Error: Unknown interaction (10062) or "The application did not respond"
Discord expects an initial response within a few seconds. If your command does slow work, defer the response first and send the result afterwards.
Error: Improper token / Invalid token
The token is wrong, has extra spaces, or was reset. Generate a new one in the Developer Portal and update it wherever you store it. Never paste it in public code.
Still stuck?
Open the Console tab and read the first error line, since later lines are often side effects. Include that line if you contact support through our Discord.