How to Fix Discord Bot Intents Not Enabling (Privileged Gateway Intents)
In this tutorial, you'll learn about How to Fix Discord Bot Intents Not Enabling (Privileged Gateway Intents). We cover key concepts, practical examples, and best practices.
Discord Gateway Intents control what events your bot receives from Discord (member join, message content, voice state, etc.). When your bot does not receive events like guildMemberAdd or messageCreate with content, the required intent is not enabled in the Discord Developer Portal or not declared in your bot's code.
The Problem
Your bot starts without errors but does not receive certain events. For example, it does not see who joins the server, or message content is empty.
Wrong approach — using the GUILD_MEMBERS intent without enabling it in the portal.
The Fix
Enable privileged intents in the Discord Developer Portal:
1. https://discord.com/developers/applications → select your bot
2. Sidebar → "Bot"
3. Scroll to "Privileged Gateway Intents"
4. Enable the intents your bot needs:
- "SERVER MEMBERS INTENT" → for member join/leave events
- "MESSAGE CONTENT INTENT" → for reading message content
- "GUILD PRESENCES INTENT" → for presence/status updates
5. Click "Save Changes"
Declare the intents in your code:
// discord.js v14
const { Client, GatewayIntentBits } = require('discord.js');
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent, // requires portal enable
GatewayIntentBits.GuildMembers, // requires portal enable
]
});
For verified bots (over 100 servers):
1. Verified bots need Discord approval for privileged intents
2. Submit an intent verification request in the Developer Portal
3. Explain why your bot needs each privileged intent
4. Approval can take 1-2 weeks
Expected output:
Bot receives all expected events
Member join/leave events fire correctly
Message content is available in messageCreate events
Prevention Tips
- Only enable the intents your bot actually needs — they affect performance
- Enable intents in both the Developer Portal AND in your code
- For bots in fewer than 100 servers, enable intents without verification
- Use non-privileged alternatives when possible (e.g.,
GUILD_MESSAGESinstead ofMESSAGE_CONTENTfor metadata) - After changing intents, restart the bot completely
Common Mistakes with bot intents
- Mixing let bindings with <- bindings in do notation, producing type errors
- Overlapping type class instances that cause GHC to reject the program with ambiguous dispatch errors
- Non-exhaustive pattern matches that compile with warnings then crash at runtime
These mistakes appear frequently in real-world DISCORD code. DodaTech's contributors have identified these patterns through analysis of open-source projects and production systems.
Practice Exercise
Write a pure function that safely divides two integers using Maybe, then test it with edge cases like division by zero and negative numbers.
This exercise reinforces the concepts covered in this guide. Try implementing it before checking online solutions.
FAQ
Related: DodaTech's Discord Bot Configurator helps set up bot intents, permissions, and slash commands with a visual interface, generating ready-to-deploy code for discord.js. Use with DodaZIP for backup.
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro