๐ŸŽฎ
Platform Guide

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

1
Create a Discord Application
  1. Go to the Discord Developer Portal
  2. Click "New Application" and give it a name
  3. Go to the "Bot" section in the sidebar
  4. Click "Add Bot" to create a bot user
  5. Under the bot's username, click "Reset Token" and copy it
Open Developer Portal โ†’
2
Configure Bot Permissions

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.

3
Generate Invite Link
  1. Go to OAuth2 โ†’ URL Generator in the sidebar
  2. Under "Scopes", select bot and applications.commands
  3. Under "Bot Permissions", select:
    • Send Messages
    • Read Message History
    • Use Slash Commands
    • Attach Files
    • Embed Links
  4. Copy the generated URL and open it to add the bot to your server
4
Add Token to Clawdbot

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

5
Restart and Test

docker compose restart

The bot should appear online in your server. Mention it or use a slash command to test.

Advanced Configuration

Restrict to Channels
Only respond in specific channels

# In .env - channel IDs

DISCORD_ALLOWED_CHANNELS=123456,789012

Right-click a channel and "Copy ID" (Developer Mode required).

Require Mentions
Only respond when mentioned

# In .env

DISCORD_REQUIRE_MENTION=true

Bot will only respond when @mentioned.

Role-Based Access
Restrict to specific roles

# In .env - role IDs

DISCORD_ALLOWED_ROLES=111111,222222

Slash Commands
Enable Discord slash commands

# 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.