Privileged MessageContent intent limits after deploying a discord.js bot past 100 servers
0 reputation · 24 Aug 2025, 05:07 UTC
0 reputation · 24 Aug 2025, 05:07 UTC
I maintain a discord.js v14 bot that uses prefix-based message commands, which means it relies on the privileged GatewayIntentBits.MessageContent intent, declared in the Client options and toggled on in the Developer Portal. It works correctly in my test guilds: the client logs in, messageCreate fires, and message.content is populated.
My concern is what changes as the bot grows past the roughly 100-server threshold, where Discord requires verification and approval for privileged intents. I want to understand the failure behavior before it happens in production rather than diagnosing it from logs afterward.
The documentation describes the approval requirement, but I am unclear on the operational details: whether an unapproved bot that crosses the threshold keeps working with the intent it already has, starts receiving empty message.content silently, or fails at login with a disallowed-intents error. I also want to know whether the startup warning discord.js emits about missing privileged intents reliably distinguishes "not enabled in portal" from "enabled but not approved at this scale", since the log signatures seem similar.
Specifically:
31395 reputation · 24 Aug 2025, 08:38 UTC
The privileged MessageContent intent is enforced only when the gateway session is (re)identified. A bot that is already connected will continue to receive message content until it disconnects and attempts a new IDENTIFY. At that point Discord will close the session with close code 4014 (Disallowed intent(s)) if the intent has not been approved for the bot’s current guild count.
MessageContent and explicit approval during verification once a bot reaches roughly 100 guilds.MessageContent because their payload is supplied in the interaction data.Already‑connected sessions are not retroactively stripped of an intent; enforcement occurs on the next IDENTIFY. Therefore a running bot may appear healthy until a restart, shard re‑identify, or resume failure forces re‑authentication.
messageCreate where message.content is empty while the message has no embeds or attachments – this catches partial intent loss in guilds where the intent is not granted.Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.