Tips & Reference

Gateway Intents

Gateway intents control which events your bot receives from Discord. You must declare the intents you need in seyfert.config.mjs.

Common Intents

IntentRequired For
GuildsGuild events, channel access, role events
GuildMessagesMessage events in guild channels
MessageContentReading message.content (required for prefix commands)
GuildMembersguildMemberAdd, guildMemberRemove, guildMemberUpdate
GuildVoiceStatesvoiceStateUpdate — needed for music bots
DirectMessagesMessage events in DMs
GuildMessageReactionsReaction add/remove events
GuildPresencespresenceUpdate events
GuildModerationguildBanAdd, guildBanRemove, audit log events
GuildScheduledEventsScheduled event create/update/delete

GuildMembers, GuildPresences, and MessageContent are privileged intents. You must enable them in the Discord Developer Portal under Bot > Privileged Gateway Intents before using them.

Configuration

Intents are set as an array of strings in seyfert.config.mjs:

seyfert.config.mjs
import { config } from 'seyfert';

export default config.bot({
    token: process.env.BOT_TOKEN ?? '',
    intents: ['Guilds', 'GuildMessages', 'MessageContent', 'GuildVoiceStates'],
    locations: {
        base: 'dist',
        commands: 'commands',
        events: 'events',
    },
});

You can also use numeric values:

import { config } from 'seyfert';

export default config.bot({
    token: process.env.BOT_TOKEN ?? '',
    intents: 32767, // All intents
    locations: {
        base: 'dist',
        commands: 'commands',
    },
});

Choosing the Right Intents

Only enable the intents your bot actually needs. Fewer intents means less data processed and better performance.

Basic bot (slash commands only):

intents: ['Guilds']

Bot with prefix commands:

intents: ['Guilds', 'GuildMessages', 'MessageContent']

Moderation bot:

intents: ['Guilds', 'GuildMessages', 'GuildMembers', 'GuildModeration']

Music bot:

intents: ['Guilds', 'GuildVoiceStates']

Full-featured bot:

intents: ['Guilds', 'GuildMessages', 'MessageContent', 'GuildMembers', 'GuildVoiceStates', 'DirectMessages']