Skip to content

2. Intents

Exanlv edited this page Jun 8, 2025 · 3 revisions

Intents are used to limit which events get sent to your bot. When an intent is not specified, Discord will not sent the associated events at all, saving bandwidth and processing power.

In order to specify which intents to use, use the Bitwise helper.

use Ragnarok\Fenrir\Bitwise\Bitwise;
use Ragnarok\Fenrir\Enums\Intent;

$intents = Bitwise::from(
    Intent::GUILD_MESSAGES,
    Intent::DIRECT_MESSAGES,
);

You can specify however many intents you want.

To activate all intents, you can use the following. (Some intents are privileged and require verification for large bots)

use Ragnarok\Fenrir\Bitwise\Bitwise;
use Ragnarok\Fenrir\Enums\Gateway\Intents;

$intents = Bitwise::from(
    ...Intents::cases()
);

All available intents:

GUILDS
GUILD_MEMBERS
GUILD_MODERATION
GUILD_EMOJIS_AND_STICKERS
GUILD_INTEGRATIONS
GUILD_WEBHOOKS
GUILD_INVITES
GUILD_VOICE_STATES
GUILD_PRESENCES
GUILD_MESSAGES
GUILD_MESSAGE_REACTIONS
GUILD_MESSAGE_TYPING
DIRECT_MESSAGES
DIRECT_MESSAGE_REACTIONS
DIRECT_MESSAGE_TYPING
MESSAGE_CONTENT
GUILD_SCHEDULED_EVENTS
AUTO_MODERATION_CONFIGURATION
AUTO_MODERATION_EXECUTION

To figure out which intents you require for the events you desire, please refer to Discord's documentation

Clone this wiki locally