Connecting a bot and intents

Tokens, privileged intents, permissions and invite links.

Discord hides some events unless you turn on privileged intents on the Bot page of the developer portal:

  • Server Members: needed for member join and leave events, Welcome, Auto-role and logging of role changes.
  • Message Content: needed to read what people write, for message events with a text filter, automod and logs of deleted messages.

After changing intents, open Bot settings and choose Refresh from Discord. Once a bot is in 100 or more servers, Discord asks you to verify it before granting these intents.

The invite link builder in Bot settings lets you choose permissions. The bot's role must sit above any role it gives, removes or moderates.

If a token leaks, reset it in the developer portal and paste the new one under Bot settings → Bot token. The bot reconnects on its own.

Next: Commands