Discord · api · fg-0440

Discord bot crashes on login with Used disallowed intents or close code 4014

If you see Gateway closed with code 4014, the cause and the fix for Discord are below, last verified 2026-10-15.

Verified Oct 2026trust 50/100
Symptom
Gateway closed with code 4014Error: Used disallowed intentsdiscord.errors.PrivilegedIntentsRequiredUnhandled promise rejection on client.login() even with .catch() in discord.js 14.10+
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
Affected
Discord gateway, all library versions; discord.js 14.10.0 and later surfaces it as an uncaught rejection
Sources

Last verified 2026-10-15 · Confirmed by 0 builders

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun