Your bot starts, tries to connect, and dies in the same second with a “Used disallowed intents” error. Depending on your library, the console shows one of these.
discord.js:
Error [DisallowedIntents]: Privileged intent provided is not enabled or whitelisted. discord.py:
discord.errors.PrivilegedIntentsRequired: Shard ID None is requesting privileged intents
that have not been explicitly enabled in the developer portal. Other libraries report the raw gateway close code, 4014 (“Disallowed intent(s)”). They all mean the same thing, and the fix takes 30 seconds.
What the error means
When your bot connects to Discord, it announces which intents it wants: the families of events it will receive. Three of them are privileged, because they expose user data:
| Intent | discord.js | discord.py | Needed for |
|---|---|---|---|
| Server Members | GuildMembers | intents.members | Join and leave events, the full member list |
| Presence | GuildPresences | intents.presences | Online status, activities |
| Message Content | MessageContent | intents.message_content | Reading the text of messages, prefix commands like !help |
A privileged intent must be switched on in the Developer Portal before your code asks for it. If the code asks and the portal says no, Discord closes the connection with code 4014 and your library throws.
The fix: enable the intent in the Developer Portal
- Open the Discord Developer Portal and select your application.
- Go to Bot.
- Under Privileged Gateway Intents, switch on the ones your code requests: Presence Intent, Server Members Intent, Message Content Intent.
- Click Save Changes.
- Restart the bot.
No new token, no code change. If you host on Bot-Hosting, click Restart on the deployment, or run bh restart from the CLI.
Or stop asking for intents you do not use
The cleaner fix is often in the code. Many bots request everything “just in case”, copied from an old tutorial.
discord.js v14
// Asks for everything, including three privileged intents
const client = new Client({ intents: Object.values(GatewayIntentBits) }); Ask only for what you use. A slash-command bot needs just one:
const { Client, GatewayIntentBits } = require('discord.js');
const client = new Client({ intents: [GatewayIntentBits.Guilds] }); Add GuildMessages and MessageContent only if you read message text, GuildMembers only if you react to joins.
discord.py
# Asks for every intent, privileged ones included
intents = discord.Intents.all() Start from the defaults, which contain no privileged intent, and add what you need:
import discord
from discord.ext import commands
intents = discord.Intents.default()
intents.message_content = True # only if you use prefix commands or read messages
bot = commands.Bot(command_prefix="!", intents=intents) Do you even need Message Content?
Probably not. Slash commands, buttons, select menus and modals all work without it, and messages that mention your bot or are sent to it in DMs still carry their content. Moving from !command to /command removes the need for the most commonly refused intent.
Bots in 100 servers or more
For an unverified bot, enabling a privileged intent is a switch. To grow past 100 servers, a bot must be verified, and a verified bot needs Discord’s approval for each privileged intent, with a justification. A verified bot that uses an intent without approval gets the same 4014 error. If your bot is growing, plan the move to slash commands before you hit that limit; sharding comes at 2,500 servers.
Still crashing?
- You edited the wrong application. The token in your environment belongs to a specific application. Check that the application ID in the portal matches your bot.
- You forgot to save. The portal does not auto-save the intent toggles.
- It is a different error.
TokenInvalidorLoginFailureis an invalid token, not an intent problem.
On Bot-Hosting, the Console recognises this error by itself and says “Discord refused the bot: it asks for intents that are not enabled.” Click Ask AI and the assistant reads your code and logs, tells you which intent is requested where, and proposes the smallest change.
Host your bot 24/7
Fixed it? Keep it online. A free deployment runs your discord.js or discord.py bot around the clock, with no sleep timer (you renew it in one click every 4 days): see how to host a Discord bot 24/7 for free.