Skip to main content
ChimBot requires specific Discord permissions and privileged intents to function properly. This page covers all required permissions and how to configure them.

Required Privileged Intents

ChimBot uses Discord’s Privileged Gateway Intents which must be enabled in the Developer Portal:
main.py
intents = discord.Intents.default()
intents.message_content = True  # Required for reading message content
intents.members = True           # Required for member join/leave events

Enabling Privileged Intents

1

Go to Developer Portal

2

Select Your Application

Click on your bot application
3

Navigate to Bot Settings

Go to the “Bot” section in the left sidebar
4

Enable Intents

Scroll down to “Privileged Gateway Intents” and enable:
  • Message Content Intent - Allows reading message content
  • Server Members Intent - Allows tracking member join/leave events
Without these intents enabled, the bot will not be able to read messages or detect member events.

Required Bot Permissions

ChimBot needs the following permissions to operate correctly:

Core Permissions

View Channels
permission
required
Read messages and see channel contentCode reference: All message handlers (line 621)
Send Messages
permission
required
Send responses and notificationsCode reference: message.channel.send() (used throughout)
Read Message History
permission
required
Access message history for contextCode reference: Message processing (line 621-767)

Moderation Permissions

Manage Messages
permission
required
Delete spam messages and use $borrar commandCode reference:
  • message.delete() (line 642, 667)
  • channel.purge() (line 544)
  • @borrar command (line 527-556)
Moderate Members
permission
required
Timeout users for spam violationsCode reference:
  • silenciar_usuario() function (line 197-208)
  • member.timeout() (line 201)

Optional Permissions

Add Reactions
permission
React to messages (currently not used but may be useful for future features)
Send rich embeds for welcome/farewell messagesCode reference:
  • on_member_join() (line 787-800)
  • on_member_remove() (line 803-816)
To invite the bot with the correct permissions:
1

Go to OAuth2 Settings

In Discord Developer Portal, navigate to OAuth2 → URL Generator
2

Select Scopes

Check the following scopes:
  • bot - Adds the bot to servers
  • applications.commands - Enables slash commands (future use)
3

Select Permissions

Check the following bot permissions:
  • View Channels
  • Send Messages
  • Read Message History
  • Manage Messages
  • Moderate Members
  • Embed Links
  • Add Reactions
4

Copy Invite URL

Copy the generated URL at the bottom and use it to invite your bot

Permission Integer

For manual configuration, the required permissions integer is:
Permission Integer: 1099511627776 + 1073741824 + 8192 + 8 + 16384 + 67584
Combined: 1099512794624

Checking Permissions

ChimBot includes a built-in command to verify permissions:
$permisos
This command shows:
  • Server-wide permissions
  • Channel-specific permissions
  • Which required permissions are missing
Code reference: ver_permisos() command (line 557-606)

Example Output

✅ View channel
✅ Send messages
✅ Read message history
✅ Manage messages
✅ Moderate members
✅ Embed links
❌ Administrator (not required)

Permission-Based Features

Different features require different permissions:
The spam detection system needs:
  • Moderate Members - To timeout spammers for 10 seconds
  • Manage Messages - To delete spam messages
Without these permissions, the bot will detect spam but cannot take action.
The $borrar command requires:
  • Manage Messages - To delete messages in bulk
Only admins can use this command, but the bot must also have the permission.
AI-powered responses require:
  • Read Message History - To read user messages
  • Send Messages - To send AI responses
Also requires Message Content Intent enabled in Developer Portal.

Role Hierarchy

For the timeout feature to work properly:
ChimBot’s role must be higher than the roles of users it needs to moderate. Discord doesn’t allow bots to timeout users with higher or equal role positions.

Setting Role Position

1

Open Server Settings

Right-click your server and select “Server Settings”
2

Go to Roles

Navigate to the “Roles” section
3

Position Bot Role

Drag ChimBot’s role above the roles of users you want to moderate

Troubleshooting

Solutions:
  • Verify Manage Messages permission is enabled
  • Check that bot role is positioned correctly
  • Confirm permissions in specific channels (channel overrides can block permissions)
  • Run $permisos to see exact permissions
Solutions:
  • Verify Moderate Members permission is enabled
  • Ensure bot’s role is higher than target user’s highest role
  • Check that the server allows timeouts (Server Settings → Moderation)
  • Verify timeout duration is valid (10 seconds in ChimBot’s case)
Solutions:
  • Enable Message Content Intent in Discord Developer Portal
  • Wait 5-10 minutes after enabling intents (Discord caches intent settings)
  • Restart the bot after enabling intents
  • Verify bot has View Channels permission
Solutions:
  • Enable Server Members Intent in Discord Developer Portal
  • Verify intents.members = True is set in code (line 15)
  • Check that the welcome channel ID is correct
  • Restart bot after enabling intent

Best Practices

Principle of Least Privilege

Only grant permissions the bot actually needs. Don’t give Administrator permission unless absolutely necessary.

Test in Development Server

Test permission configurations in a test server before deploying to production.

Document Requirements

Keep a list of required permissions for server admins who invite your bot.

Handle Missing Permissions

The bot includes error handling for missing permissions (see discord.Forbidden exceptions).

Next Steps

Environment Setup

Configure API keys and tokens

Customization

Customize bot behavior and personality

Build docs developers (and LLMs) love