NapNodes
Free tool · Discord bots

Discord intents calculator

Tick what your bot does (or search the event you're not getting, like on_member_join or messageCreate) and out come the intents to request, the number, the code for discord.js or discord.py and the switches you have to turn on in the Discord portal. It also works the other way round: paste a number and we'll tell you which intents it is.

What does your bot do?

Shortcuts (added to whatever you've already ticked):

21 intents · Go to the code

Server and members 8

Messages in channels 5

Direct messages 4

Voice, events and AutoMod 4

Already have a number?

Your intents number

0

With no intents, the bot connects but receives almost nothing. For a slash command bot, tick at least “Servers, channels and roles”.

The code

const { Client, GatewayIntentBits } = require("discord.js");

const client = new Client({
  intents: [],
});

Nothing you tick leaves your browser.

What intents are

A Discord bot stays connected all the time and Discord keeps sending it what happens: messages, people joining, reactions… Intents are the list of what the bot wants to receive, and they're requested when it connects. What you don't ask for never arrives: if your bot doesn't request messages, your on_message never runs, with no error at all. That's why, if an event “doesn't work”, the first thing to check is whether its intent is on the list.

Like permissions, they go in a single number: each intent is a power of two and the number is the sum. Messages in channels (512) + message content (32768) + servers (1) = 33281.

The three privileged ones

Three intents give out people's personal data and Discord keeps them apart: members (who joins and leaves), presences (who is online and what they're playing) and message content (what gets written). To use them you have to do two things, and if one is missing the bot won't start or won't see anything:

  1. Request it in the code, like in the code above.
  2. Enable it in the portal: discord.com/developers/applications → your application → “Bot” → “Privileged Gateway Intents” → “Server Members Intent”, “Presence Intent” or “Message Content Intent”. Save the changes.

And then restart the bot: intents are requested when it connects.

Do I need message content?

Only if your bot reads what people write: prefix commands (!help), word filters, auto-replies, leveling bots that count messages. Without it, the bot still sees messages that mention it, DMs and its own. If your bot runs on slash commands, you don't need it: Discord hands it the command's options already split up. That's why slash commands are recommended today: one less privileged intent to justify when the bot grows.

Frequently asked questions

My bot is online but doesn't respond to “!” commands. Why?

It's almost always message content: without MESSAGE_CONTENT, messages reach the bot with empty text, so it never sees your “!ping”. You have to request it in the code (with GUILD_MESSAGES) and enable “Message Content Intent” in the portal. That's the “!” commands shortcut above.

What does “PrivilegedIntentsRequired” or “DisallowedIntents” mean?

That your code asks for a privileged intent (members, presences or message content) that isn't enabled in the portal, and Discord closes the connection with code 4014. Enable it under “Bot” → “Privileged Gateway Intents”, or remove it from the code if you don't use it.

And code 4013?

That the intents number has bits that don't belong to any intent (a badly copied or made-up one). Paste your number above, in “Already have a number?”, and we'll tell you which bits are extra.

Do slash commands need any intent?

No: interactions (slash commands, buttons, menus) always arrive, whatever you ask for. Still, ask for GUILDS: the libraries use it to know which servers the bot is in and which channels they have.

Why not just ask for all of them and forget about it?

Because every intent is traffic your bot receives and processes even if it doesn't use it: with presences, a big server sends a notice every time someone changes status or game. More memory and more CPU for nothing. And when the bot grows, the privileged ones have to be justified.

When do I have to ask Discord for permission for a privileged intent?

According to Discord's documentation, while your application has fewer than 10,000 users it's enough to enable it in the portal. Beyond that, Discord notifies the owner and you have to request a review explaining what each one is used for.

Can I use the number instead of the list?

Yes: in discord.js, intents: 33281; in discord.py, discord.Intents(value=33281). It works the same, but with the list you can read what the bot asks for, which is why the code above uses names.

If the bot still doesn't respond with the intents set correctly, go over the other causes in my Discord bot isn't responding; and to invite it with just the right permissions, the permissions calculator.

And where does it run?

A bot only responds while its program is running: if it's on your computer, it goes off when you turn the computer off. At NapNodes you get a free Discord bot, no card needed: 256 MB of memory, always on, and every 7 days you renew it with one click in the panel. It works for Node.js (discord.js) or Python (discord.py): you choose in Settings → Language. If it falls short, there are Mini and Plus plans, with nothing to renew. How to upload the code is in hosting for your Discord bot.

Create your free bot

More free tools

All the tools