Skip to content

Gateway Intents

Discord only sends events your bot explicitly requests through Gateway Intents. Missing an intent means missing the corresponding events. This is one of the most common sources of bot bugs.

The generated scaffold starts with the minimum intent for slash command bots:

src/bight.ts
import { GatewayIntentBits } from "discord.js";
// Inside client options
intents: [GatewayIntentBits.Guilds]

Guilds covers guild join/leave events and the baseline data needed for slash commands.

Add intents in src/bight.ts when you need access to additional event types:

FeatureRequired intentsPrivileged?
Prefix commandsGuildMessages, MessageContentMessageContent is privileged
Message commandsGuildMessages, MessageContentMessageContent is privileged
Voice state trackingGuildVoiceStatesNo
Member join/leave eventsGuildMembersYes
Presence updatesGuildPresencesYes

Privileged intents must also be enabled in the Discord Developer Portal under your bot’s settings. Enabling them in code alone is not enough.

All intent configuration lives in src/bight.ts. This makes the bot’s event surface visible from one file, so there’s no need to search the codebase to understand what data the bot receives from Discord.