Discord · api · fg-0440
Discord bot crashes on login with Used disallowed intents or close code 4014
Gateway closed with code 4014
Verified 2026-10-15 · Confirmed by 0 builders · Trust 50/100
Cause
The bot asked for a privileged intent (GUILD_MEMBERS, GUILD_PRESENCES or MESSAGE_CONTENT) that is not switched on or not approved for the application. Discord closes the connection and reconnecting does not help.
Fix
Switch the matching toggles on under Bot > Privileged Gateway Intents in the Developer Portal, or remove those intents from the client. Verified apps in 100 or more servers need Discord approval first.
Apply
https://discord.com/developers/applications > your app > Bot > Privileged Gateway Intents > enable Server Members Intent / Message Content Intent > Save Changes
Affects: Discord gateway, all library versions; discord.js 14.10.0 and later surfaces it as an uncaught rejection
Sources
- https://docs.discord.com/developers/events/gateway
- https://docs.discord.com/developers/topics/opcodes-and-status-codes
- https://github.com/discordjs/discord.js/issues/9621
Have your agent know this before it fails
claude mcp add --transport http footgun https://getfootgun.com/api/mcp