How to fix "Used disallowed intents" (privileged intents)
Fix the Used disallowed intents and PrivilegedIntentsRequired errors by enabling Message Content, Server Members or Presence intents in the Developer Portal.
Updated · 2 min read
"Used disallowed intents" (discord.js) and PrivilegedIntentsRequired (discord.py) mean your code asks for a privileged intent that isn't enabled for your bot in the Discord Developer Portal. Either turn the intent on in the portal or stop requesting it in code.
What the errors look like
discord.js:
Error: Used disallowed intents
discord.py:
discord.errors.PrivilegedIntentsRequired: Shard ID None is requesting privileged intents that have not been explicitly enabled in the developer portal.
The bot fails to log in and the process usually exits, so on Schokr you'll see the server stop right after starting.
The three privileged intents
| Portal toggle | discord.js | discord.py | Needed for |
|---|---|---|---|
| Message Content Intent | GatewayIntentBits.MessageContent | intents.message_content | Reading message text, attachments and embeds (prefix commands, auto-moderation, chat logging) |
| Server Members Intent | GatewayIntentBits.GuildMembers | intents.members | Member join and leave events, member updates, fetching the full member list |
| Presence Intent | GatewayIntentBits.GuildPresences | intents.presences | Online status and activities ("Playing...") of members |
Without Message Content, your bot still gets message text in DMs, in messages that mention it, and in its own messages. Slash commands don't need it at all.
Fix: enable the intent in the portal
- Open the Discord Developer Portal and select your application.
- Go to the Bot page.
- Under Privileged Gateway Intents, turn on the intents your code requests.
- Save changes.
- Restart your server on Schokr.
The code and the portal must match: every privileged intent in your code needs its portal toggle on.
Or: remove intents you don't need
Requesting fewer intents means less data and less memory. If you only use slash commands, this is enough in discord.js:
const client = new Client({ intents: [GatewayIntentBits.Guilds] });
And in discord.py:
intents = discord.Intents.default() # no privileged intents
bot = commands.Bot(command_prefix="!", intents=intents)
Avoid discord.Intents.all() unless you really use everything; it requests all three privileged intents.
Bots in 100 or more servers
Once a bot is in 100 or more servers it must be verified, and privileged intents then need approval from Discord with a reason for each one. Until approved, you can't simply flip the toggles. Plan for this early by using slash commands instead of reading message content where you can.
Related problems
- Bot logs in but ignores
!commands: Message Content is missing in code. See bot online but not responding. guildMemberAdd/on_member_joinnever fires: the members intent is missing in code or the portal.