Fix Discord Close Code 4014 (Disallowed Intents)

Step-by-step fix for Discord close code 4014 in discord.js and discord.py, plus how to remove unused privileged intents.

What Discord close code 4014 means

When your bot connects to Discord's Gateway, it tells Discord which events it wants to receive (called Gateway Intents). Three of those intents are marked privileged because they expose member activity or message text:

  • Message Content Intent (GatewayIntentBits.MessageContent / intents.message_content ) — required to read normal chat message text, prefix commands like !help , attachments, and embeds.
  • Server Members Intent (GatewayIntentBits.GuildMembers / intents.members ) — required for member join/leave events, welcome messages, and fetching full member lists.
  • Presence Intent (GatewayIntentBits.GuildPresences / intents.presences ) — required only to read live online/idle/game status updates for members.

If your code requests one of these intents while its toggle is switched off in the Discord Developer Portal, Discord closes the connection immediately with close code 4014 :

  • discord.js: Error: Used disallowed intents
  • discord.py: discord.errors.PrivilegedIntentsRequired: Shard ID None is requesting privileged intents that have not been explicitly enabled in the developer portal.

Step 1: Enable the required intent in Discord

  1. Open the Discord Developer Portal and select your bot's application.
  2. Open the Bot tab in the left sidebar and scroll down to Privileged Gateway Intents.
  3. Turn on only the toggle(s) your bot genuinely uses — most commonly Message Content Intent and/or Server Members Intent.
  4. Click Save Changes at the bottom of the page, then restart your bot.
Enable only the Privileged Gateway Intents your bot actually requests, then click Save Changes.
Bots in 100+ servers
If your bot is already in 100 or more servers, Discord requires verification approval before enabling privileged intents. For small and single-server bots (under 100 servers), the toggles take effect immediately once saved.

Step 2: Remove intents your bot doesn't actually need

A very common mistake — especially in starter templates and AI-generated code — is requesting Intents.all() or enabling Presence Intent when the bot only uses slash commands. Removing unused privileged intents fixes 4014 , cuts memory usage, and avoids heavy presence event traffic.

discord.js (v14) — minimal intents
const { Client, GatewayIntentBits } = require('discord.js');

const client = new Client({
  intents: [
    GatewayIntentBits.Guilds,
    // Add GuildMessages + MessageContent only if you read regular chat text:
    GatewayIntentBits.GuildMessages,
    GatewayIntentBits.MessageContent,
  ],
});
discord.py (v2) — minimal intents
import discord
from discord.ext import commands

intents = discord.Intents.default()
# Turn on only what you use (avoid discord.Intents.all() unless needed):
intents.message_content = True
# intents.members = True

bot = commands.Bot(command_prefix="!", intents=intents)
Slash commands rarely need Message Content
If your bot only responds to /slash commands, buttons, and modals, you usually only need GatewayIntentBits.Guilds (or discord.Intents.default() ) — zero privileged intents required.

How Blip Host catches 4014 automatically

On Blip Host, you do not have to wait for a crash loop to notice a missing intent. When you paste your token during bot setup, Blip Host checks your Developer Portal flags right away. If a running bot later hits 4014 , Blip Host flags the exact missing toggle on your bot overview with a direct link to the Developer Portal and sends you an email alert.

After saving the toggle in Discord, click Re-check with Discord on the banner and your bot reconnects automatically.

Cookie preferences

We use essential cookies to keep Blip Host working securely. With your permission, we also use Microsoft Clarity to see how pages are used so we can fix rough edges. Passwords and bot tokens are masked, and we never run ads. Privacy Policy