⛓️ Gateway Intents
It can be a weird terms, right? You've maybe heard of it before, but what does it mean? What does it do? How do I use it? Well, let's get into it!
What are Gateway Intents?
Gateway Intents are a way to tell Discord what events and data you want to receive from them. This is useful for bots that don't need to receive all the data, and can help reduce the amount of data that is sent to your bot.
For instance, a specific
message content intent is required to get any message's content, while
guild moderation intent is required for any moderation action (such as ban, kick, getting logs, etc...)!
Some intents are considered "privileged", which means that you need to enable them in your bot's application page. You can do this by going to your application page, selecting your bot, and going to the "Bot" tab. There, you can enable the intents you want to use.
They will be marked in the following intent list.
Information per Intent
Guild Members (
Events which inform us about member update/leave/join of a guild. This is required to chunk all members of a guild. This will also update user information such as name/avatar.
Message Content (
Access to message content.
This specifically affects messages received through the message history of a channel, or through Message Events. The content restriction does not apply if the message mentions the bot directly (using @username), sent by the bot itself, or if the message is a direct message from a PrivateChannel. Affected syntaxes are:
Guild Presences (
This is used to lazy load members and update user properties such as name/avatar.
This is a very heavy intent! Presence updates are 99% of traffic the bot will receive. To get user update events you should consider using
guild members instead.
Less Important Intents
Guild Moderation (
Moderation events, such as ban/unban/audit-log.
Guild Emojis and Stickers (
guild emojis and stickers)
Custom emoji and sticker add/update/delete events.
Guild Webhooks (
Webhook add/update/delete events.
Guild Invites (
Invite add/update/delete events.
Guild Voice States (
guild voice states)
Voice state events. This is used to determine which members are connected to a voice channel.
Guild Messages (
Message events from text channels in guilds.
Guild Message Reactions (
guild message reactions)
Reaction add/update/delete events from text channels in guilds.
Guild Message Typing (
guild message typing)
Typing events from text channels in guilds.
Direct Messages (
Message events from direct/private messages.
Direct Message Reactions (
direct message reactions)
Reaction add/update/delete events from direct/private messages.
Direct Message Typing (
direct message typing)
Typing events from direct/private messages.
Scheduled Events (
Scheduled Events events.