Quick fix for the 'Used disallowed intents' (Privileged Gateway Intents) error in Discord.js v14 and Python Discord bots.
Discord requires developers to explicitly enable Privileged Gateway Intents for any bot that needs access to Server Members, Message Content, or Presence Updates. If your code specifies GatewayIntentBits.MessageContent or GuildMembers without enabling them in the Developer Portal, the bot will fail to connect with Error [DisallowedIntents].
Log in to the Discord Developer Portal (discord.com/developers), navigate to your Application -> Bot -> scroll to Privileged Gateway Intents -> Toggle ON: Presence Intent, Server Members Intent, and Message Content Intent -> Click Save Changes. Restart your bot, and it will connect immediately.
No. Any unverified bot in fewer than 100 servers can enable Privileged Gateway Intents directly in the developer dashboard.