Guide
Discord.js Bot Not Receiving Messages: Diagnosing Missing Privileged Intents
Diagnose why a Discord.js bot receives the ready event but never triggers messageCreate due to missing privileged gateway intents.
Published by Tasadduq Burney
31 Aug 2025, 04:28 UTC
2 min106.1K views0

Recognizable condition
The bot logs show a successful ready event, but the messageCreate handler never runs when users send messages in any text channel.
Cause and diagnostic table
| Possible cause | What to look for |
|---|---|
| Privileged gateway intents (GuildMessages or MessageContent) missing from the Client constructor | Check the intents array passed to new Client({ intents: [...] }) |
| Intents not enabled in the Discord Developer Portal | Visit the bot application → Bot → Privileged Gateway Intents and see if the toggles are on |
Ordered checks
- Inspect the client initialization code: verify that
GatewayIntentBits.GuildMessagesandGatewayIntentBits.MessageContentare present in the intents array. - Open the Discord Developer Portal, select your bot application, go to Bot → Privileged Gateway Intents and confirm that both toggles are switched on.
- After confirming the code and portal settings, restart the bot process and watch the logs for the
readyevent.
Fixes tied to findings
- If the intents array is missing one or both bits, add them:
const { Client, GatewayIntentBits } = require('discord.js');
const client = new Client({ intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent
]});- If the portal toggles are off, turn them on, then save changes.
- After making either change, restart the bot (e.g.,
pm2 restart my-botorCtrl+Cthennode index.js).
Escalation criteria
If message events still do not fire after verifying intents and restarting:
- Check shard readiness: ensure
client.ws.status === 0(WebSocket OPEN) for each shard. - Look for rate‑limit warnings in the console (
429responses). - Review any errors emitted on the
shardErrororerrorevents. - Collect the bot’s intent bitfield (
client.intents.bitfield) and the portal settings, then file an issue on the Discord.js repository with logs and the intent configuration.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.