Discord Bot Creator

Discord intents calculator

Choose the gateway events your bot listens to. You get the intents bitfield, the discord.js code, and a list of the privileged ones to switch on.

Free, no sign-in. Runs in your browser; nothing you type is sent to us.

Start from

A common setup, or an intents number from existing code.

Server structure

  • Guilds1 << 0

    The server, its roles, channels and threads. discord.js needs this for its cache, so almost every bot turns it on.

    • GUILD_CREATE
    • GUILD_UPDATE
    • GUILD_DELETE
    • GUILD_ROLE_CREATE
  • GuildModeration1 << 2

    Bans, unbans and new audit log entries. Useful for mod-log bots.

    • GUILD_AUDIT_LOG_ENTRY_CREATE
    • GUILD_BAN_ADD
    • GUILD_BAN_REMOVE
  • GuildExpressions1 << 3

    Changes to emoji, stickers and soundboard sounds.

    • GUILD_EMOJIS_UPDATE
    • GUILD_STICKERS_UPDATE
    • GUILD_SOUNDBOARD_SOUND_CREATE
    • GUILD_SOUNDBOARD_SOUND_UPDATE

    Older discord.js versions call it GuildEmojisAndStickers.

  • GuildIntegrations1 << 4

    Integrations such as Twitch or YouTube being added, changed or removed.

    • GUILD_INTEGRATIONS_UPDATE
    • INTEGRATION_CREATE
    • INTEGRATION_UPDATE
    • INTEGRATION_DELETE
  • GuildWebhooks1 << 5

    A webhook in a channel was created, changed or deleted.

    • WEBHOOKS_UPDATE
  • GuildInvites1 << 6

    Invites being created and deleted. Invite-tracker bots use this.

    • INVITE_CREATE
    • INVITE_DELETE
  • GuildScheduledEvents1 << 16

    Scheduled events and who marked themselves as interested.

    • GUILD_SCHEDULED_EVENT_CREATE
    • GUILD_SCHEDULED_EVENT_UPDATE
    • GUILD_SCHEDULED_EVENT_DELETE
    • GUILD_SCHEDULED_EVENT_USER_ADD
  • AutoModerationConfiguration1 << 20

    AutoMod rules being created, edited or deleted.

    • AUTO_MODERATION_RULE_CREATE
    • AUTO_MODERATION_RULE_UPDATE
    • AUTO_MODERATION_RULE_DELETE
  • AutoModerationExecution1 << 21

    AutoMod blocked or flagged something.

    • AUTO_MODERATION_ACTION_EXECUTION

Members, presence and voice

  • GuildMembers1 << 1Privileged

    Members joining, leaving or changing roles and nicknames. Welcome and auto-role bots need it. Turn on “Server Members Intent” in the Developer Portal.

    • GUILD_MEMBER_ADD
    • GUILD_MEMBER_UPDATE
    • GUILD_MEMBER_REMOVE
    • THREAD_MEMBERS_UPDATE
  • GuildPresences1 << 8Privileged

    Online status and activity (playing, streaming, listening) of every member. Turn on “Presence Intent” in the Developer Portal.

    • PRESENCE_UPDATE
  • GuildVoiceStates1 << 7

    Who joins, leaves or mutes in voice channels. Music bots need it to join voice.

    • VOICE_CHANNEL_EFFECT_SEND
    • VOICE_STATE_UPDATE

Server messages

  • GuildMessages1 << 9

    Messages sent, edited and deleted in server channels.

    • MESSAGE_CREATE
    • MESSAGE_UPDATE
    • MESSAGE_DELETE
    • MESSAGE_DELETE_BULK
  • MessageContent1 << 15Privileged

    Sends no events of its own. It fills in the text, embeds, attachments and components of messages, which are empty without it (except messages that mention the bot). Turn on “Message Content Intent” in the Developer Portal.

  • GuildMessageReactions1 << 10

    Reactions added and removed. Reaction-role bots need it.

    • MESSAGE_REACTION_ADD
    • MESSAGE_REACTION_REMOVE
    • MESSAGE_REACTION_REMOVE_ALL
    • MESSAGE_REACTION_REMOVE_EMOJI
  • GuildMessageTyping1 << 11

    Someone started typing in a server channel.

    • TYPING_START
  • GuildMessagePolls1 << 24

    Votes added to and removed from polls in server channels.

    • MESSAGE_POLL_VOTE_ADD
    • MESSAGE_POLL_VOTE_REMOVE

Direct messages

  • DirectMessages1 << 12

    Messages people send to the bot in DMs.

    • MESSAGE_CREATE
    • MESSAGE_UPDATE
    • MESSAGE_DELETE
    • CHANNEL_PINS_UPDATE
  • DirectMessageReactions1 << 13

    Reactions on messages in DMs.

    • MESSAGE_REACTION_ADD
    • MESSAGE_REACTION_REMOVE
    • MESSAGE_REACTION_REMOVE_ALL
    • MESSAGE_REACTION_REMOVE_EMOJI
  • DirectMessageTyping1 << 14

    Someone started typing in a DM with the bot.

    • TYPING_START
  • DirectMessagePolls1 << 25

    Votes on polls in DMs.

    • MESSAGE_POLL_VOTE_ADD
    • MESSAGE_POLL_VOTE_REMOVE

Intents bitfield

1
1 intent, 0 privileged.

discord.js (v14)

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

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

What gateway intents do

A bot connects to Discord's gateway, a live connection that pushes events like a new message or a member joining. Intents are how the bot says which groups of events it wants. Ask for fewer and the bot receives less traffic and keeps less in memory. Each intent is one bit, and the value sent when the bot connects is all the chosen bits added together: Guilds (1), Guild messages (512) and Message content (32768) make 33281.

Three intents are privileged because they expose personal data: Server Members, Presence and Message Content. You switch them on in the Developer Portal: open your application, go to Bot, and find Privileged Gateway Intents. Requesting one in code without turning it on makes the connection fail.

Bots in fewer than 100 servers can toggle privileged intents freely. At 100 servers a bot has to be verified, and each privileged intent needs Discord's approval. If your bot only uses slash commands, you probably do not need Message Content at all, which keeps verification simple.

Questions

Why does my bot see empty message content?

Message content is a privileged intent. Without it, the content, embeds, attachments and components of messages arrive empty, except in DMs and messages that mention the bot. Add the MessageContent intent in your code and turn on Message Content Intent in the Developer Portal under Bot.

What does “Used disallowed intents” mean?

Your code asks for a privileged intent (Server Members, Presence or Message Content) that is switched off for your application. Discord closes the connection with code 4014. Turn the intent on in the Developer Portal, Bot, Privileged Gateway Intents, or remove it from your code.

Do slash commands need any intents?

No. Slash commands, buttons and other interactions reach your bot whether or not you request intents. Most discord.js bots still add Guilds so the library can cache servers, channels and roles.

What changes when my bot reaches 100 servers?

Bots in 100 or more servers must be verified by Discord, and each privileged intent then needs Discord’s approval, with a reason for why the bot needs it. Below 100 servers you can switch privileged intents on and off yourself.

The robot sitting by a toolbox with a wrench

Rather skip the intents puzzle?

Describe the bot you want. We pick the intents it needs, tell you which switches to flip, and keep it online.