Clawdbot for Discord
Add Clawdbot to your Discord server for AI-powered conversations with your community. Perfect for study groups, teams, and gaming communities.
Discord Features
Server Channels
Use in any text channel
DM Support
Private conversations
Slash Commands
Native Discord commands
Thread Support
Organized conversations
Attachments
Analyze images and files
Role-Based Access
Control who can use it
Setup Guide
- Go to the Discord Developer Portal
- Click "New Application" and give it a name
- Go to the "Bot" section in the sidebar
- Click "Add Bot" to create a bot user
- Under the bot's username, click "Reset Token" and copy it
In the Bot section, enable these Privileged Gateway Intents:
- โMessage Content Intent
- โServer Members Intent (optional, for mentions)
Without Message Content Intent, the bot cannot read message contents.
- Go to OAuth2 โ URL Generator in the sidebar
- Under "Scopes", select bot and applications.commands
- Under "Bot Permissions", select:
- Send Messages
- Read Message History
- Use Slash Commands
- Attach Files
- Embed Links
- Copy the generated URL and open it to add the bot to your server
Add your bot token to the Clawdbot configuration:
# In your .env file
DISCORD_BOT_TOKEN=MTIzNDU2Nzg5MDEyMzQ1Njc4OTAx.XXXXXX.XXXXXXXXXX
# Optional: Application ID for slash commands
DISCORD_APPLICATION_ID=1234567890123456789
docker compose restart
The bot should appear online in your server. Mention it or use a slash command to test.
Advanced Configuration
# In .env - channel IDs
DISCORD_ALLOWED_CHANNELS=123456,789012
Right-click a channel and "Copy ID" (Developer Mode required).
# In .env
DISCORD_REQUIRE_MENTION=true
Bot will only respond when @mentioned.
# In .env - role IDs
DISCORD_ALLOWED_ROLES=111111,222222
# In .env
DISCORD_SLASH_COMMANDS=true
Enables /ask, /reset, /model commands.
Tips for Discord
Use Threads for Long Conversations
Create threads to keep AI conversations organized and out of main channels.
Set Up a Dedicated Channel
Create an #ai-chat channel for bot interactions to keep other channels clean.
Attach Images for Analysis
Attach images to your messages and ask the bot to analyze or describe them.