НОВОЕ 📢 Сэкономьте до 30% в первый месяц, ограниченное предложение!

Fix "Used disallowed intents" on your Discord bot

Discord bot hostingUpdated Oct 6, 20263 min read

Your console shows one of these when the bot tries to log in:

  • Error [DisallowedIntents]: Privileged intent provided is not enabled or whitelisted. (discord.js)
  • Used disallowed intents (several libraries)
  • PrivilegedIntentsRequired (discord.py)

What it means

Your code asked Discord for an intent that is switched off for your bot. Three intents are privileged and must be switched on by hand: Presence, Server Members and Message Content.

Fix it

  1. Open the Discord Developer Portal, choose your application and open Bot.
  2. Under Privileged Gateway Intents, switch on the ones your code requests.
  3. Save, then restart your server from Console in the panel.

Which one do I need?

Look at your code for the intents it lists:

  • GatewayIntentBits.MessageContent or intents.message_content = True: Message Content Intent.
  • GatewayIntentBits.GuildMembers or intents.members = True: Server Members Intent.
  • GatewayIntentBits.GuildPresences or intents.presences = True: Presence Intent.

If you do not need one, remove it from your code instead. A bot that only uses slash commands needs none of the three.

Bots in many servers

While a bot is in fewer than 100 servers you can switch the intents on yourself. Past that, Discord asks you to verify the bot and apply for each privileged intent you use.

СОЗДАЙТЕ СВОЙ ИГРОВОЙ СЕРВЕР
ГОТОВЫ НАЧАТЬ?

Сэкономьте до 30% на вашем новом игровом сервере.
Премиальная производительность, мгновенная активация и непревзойдённая надёжность по лучшей цене.

ПОСЛЕДНИЕ БЛОГИ