Skip to main content
Gateway intents allow you to control which events your bot receives from Discord. They help reduce bandwidth and processing requirements by only subscribing to the events you actually need.

What are Intents?

Intents are a system introduced by Discord to give developers control over which events their bot receives. Each intent corresponds to a set of WebSocket events. The Intents class in Pycord (located at discord/flags.py:591) provides a bitfield-based system for managing these subscriptions.

Creating Intents

The easiest way to get started is with default intents, which enable most common events except privileged ones:
import discord

intents = discord.Intents.default()
bot = discord.Bot(intents=intents)
Default intents exclude:
  • presences (privileged)
  • members (privileged)
  • message_content (privileged)

Common Intents

Guild Intents

intents.guilds = True
Enables guild-related events:
  • on_guild_join
  • on_guild_remove
  • on_guild_channel_update
  • on_guild_channel_create
  • on_guild_channel_delete
The guilds intent is highly recommended for most bots as it provides core functionality.

Message Intents

intents.guild_messages = True  # For server messages
intents.dm_messages = True      # For direct messages
intents.messages = True         # Shortcut for both
Enables message events:
  • on_message
  • on_message_edit
  • on_message_delete
  • on_reaction_add / on_reaction_remove

Member Intents (Privileged)

intents.members = True
Enables member-related events:
  • on_member_join
  • on_member_remove
  • on_member_update
  • Access to Guild.members list
This is a privileged intent requiring approval in the Discord Developer Portal for bots in 100+ servers.

Privileged Intents

Three intents require special approval from Discord:
Required for:
  • Member join/leave events
  • Member update events
  • Full member cache
  • Guild.members access
Enable in Developer Portal:
  1. Go to your application’s Bot page
  2. Scroll to “Privileged Gateway Intents”
  3. Enable “Server Members Intent”
intents = discord.Intents.default()
intents.members = True
Required for:
  • on_presence_update events
  • Member.activities access
  • Member.status access
Enable in Developer Portal:
  1. Go to your application’s Bot page
  2. Enable “Presence Intent”
intents = discord.Intents.default()
intents.presences = True
Required for:
  • Reading message content in guilds
  • Message.content access
  • Message.embeds, Message.attachments, Message.components access
Enable in Developer Portal:
  1. Go to your application’s Bot page
  2. Enable “Message Content Intent”
intents = discord.Intents.default()
intents.message_content = True
Without this intent, message content fields will be empty for messages not mentioning your bot, not sent by your bot, or not in DMs.

Intent Events Reference

Here’s a comprehensive mapping of intents to their corresponding events:
IntentEvents Enabled
guildsGuild join/remove, channel updates, role updates
membersMember join/remove/update, user updates
moderationAudit log, bans/unbans
emojis_and_stickersEmoji and sticker updates
integrationsIntegration create/update/delete
webhooksWebhook updates
invitesInvite create/delete
voice_statesVoice state updates (required for voice)
presencesPresence/status updates
guild_messagesGuild message events
dm_messagesDM message events
guild_reactionsGuild reaction events
dm_reactionsDM reaction events
guild_typingGuild typing indicators
dm_typingDM typing indicators
message_contentAccess to message content in guilds
scheduled_eventsScheduled event CRUD operations
auto_moderation_configurationAutoMod rule changes
auto_moderation_executionAutoMod action executions
guild_pollsPoll vote events in guilds
dm_pollsPoll vote events in DMs

Complete Example

Here’s a complete bot setup with properly configured intents:
import discord
from discord.ext import commands

# Configure intents for a bot that needs messages and member data
intents = discord.Intents.default()
intents.members = True        # Privileged - enable in Dev Portal
intents.message_content = True  # Privileged - enable in Dev Portal

bot = commands.Bot(
    command_prefix="!",
    intents=intents
)

@bot.event
async def on_ready():
    print(f"Logged in as {bot.user}")
    print(f"Guilds intent: {bot.intents.guilds}")
    print(f"Members intent: {bot.intents.members}")
    print(f"Message content intent: {bot.intents.message_content}")

@bot.event
async def on_member_join(member):
    # This requires the members intent
    print(f"{member.name} joined {member.guild.name}")

@bot.event
async def on_message(message):
    # Reading message.content requires message_content intent
    if message.author.bot:
        return
    
    print(f"Message from {message.author}: {message.content}")
    await bot.process_commands(message)

bot.run("TOKEN")

Checking Current Intents

You can check which intents are enabled on your client:
@bot.event
async def on_ready():
    # Access the intents property
    print(f"Current intents value: {bot.intents.value}")
    
    # Check individual intents
    if bot.intents.members:
        print("Members intent is enabled")
    
    if bot.intents.message_content:
        print("Message content intent is enabled")
    
    # Iterate through all intents
    for intent_name, enabled in bot.intents:
        print(f"{intent_name}: {enabled}")

Common Errors

Error: discord.errors.PrivilegedIntentsRequiredCause: Your bot is trying to use a privileged intent that hasn’t been enabled in the Developer Portal.Solution:
  1. Visit the Discord Developer Portal
  2. Select your application
  3. Go to the “Bot” section
  4. Enable the required privileged intent(s)
  5. If your bot is in 100+ servers, you may need to verify your bot first
Problem: Events like on_member_join aren’t firingCause: The required intent isn’t enabledSolution: Check which intent is required for your event and enable it:
# For member events
intents.members = True

# For message content
intents.message_content = True

# For presence updates
intents.presences = True

Best Practices

  1. Enable only what you need - Unnecessary intents waste bandwidth and resources
  2. Use Intents.default() as a starting point - It enables common functionality
  3. Document privileged intent usage - Help users understand why they’re needed
  4. Test without privileged intents - Design features that don’t require them when possible
  5. Handle missing data gracefully - Not all data is available without certain intents

Build docs developers (and LLMs) love