๐ฏ Connect Clawdbot + Discord (StepโByโStep)
Get Clawdbot running inside your Discord server so you can @mention it and get replies.
๐ค What Youโll Get / Why This Matters
- โ A Discord bot that shows Online
- โ Clawdbot connected to Discord
- โ The bot only works in one channel (safe for company servers)
๐ What You Need
- โ A Discord account with Manage Server permission (or server owner)
- โ Clawdbot installed on your Mac
- โ Terminal access on the Mac where Clawdbot runs
๐ Step 1: Create a Discord App + Bot
1. Open this page:
https://discord.com/developers/applications
2. Click New Application
3. Name it (example): Clawdbot + Moltbot
4. Go to Bot
5. Click Add Bot
๐ Step 2: Turn On the Right Discord Intent (IMPORTANT)
If this is OFF, your bot can look online but wonโt read messages.
1. Developer Portal โ Bot
2. Scroll to Privileged Gateway Intents
3. Turn ON:
- โ Message Content Intent
4. Click Save Changes
๐ Step 3: Copy Your Bot Token
1. Developer Portal โ Bot
2. Click Reset Token
3. Click Copy
โ ๏ธ Important: Treat this token like a password. Donโt paste it in public chats.
๐ Step 4: Create an Invite Link (Install Link)
1. Developer Portal โ Installation
2. Under Installation Contexts enable:
- โ Guild Install
3. Under Default Install Settings โ Guild Install set:
Scopes (required):
- โ bot
- โ applications.commands
Permissions (minimum):
- โ View Channels
- โ Send Messages
- โ Read Message History
- โ (Optional) Send Messages in Threads
4. Copy the Discord Provided Link
5. Open it in your browser
6. Choose your server โ click Authorize
๐ Step 5: Lock the Bot to One Channel (Recommended)
This is the safest way for a company server.
1. In Discord, create a channel:
- `#clawdbot`
2. Rightโclick `#clawdbot` โ Edit Channel
3. Go to Permissions
4. Add the bot user/role
5. Allow:
- โ View Channel
- โ Read Message History
- โ Send Messages
6. Make sure the bot does NOT have View Channel in other channels.
๐ง Step 6: Add Discord to Clawdbot
On your Mac:
1. Run:
clawdbot configure
2. Choose:
- Local (this machine)
- Discord
3. Paste the Bot Token when asked
4. Set policy to Allowlist (recommended)
๐ Step 7: Restart Clawdbot
Run:
clawdbot gateway restart
clawdbot status –all
โ You should see:
- Discord: ON / OK
๐ฌ Step 8: Test It
In your Discord `#clawdbot` channel, type:
@Clawdbot + Moltbot hello
โ If everything is correct, it replies.
โ Common Problems
Problem: Bot is online but doesnโt reply
- โ Turn ON Message Content Intent (Step 2)
- โ Check channel permissions (Step 5)
Problem: My server doesnโt show in the invite dropdown
- You need Manage Server permission (or owner)
- Make sure youโre logged into the right Discord account
Problem: Clawdbot says โport already in useโ
- You might have an older gateway running.
- Restart with:
clawdbot gateway restart
๐ You Did It!
You now have Clawdbot running in Discord.
Next: tell me what you want it to do in Discord (Q&A, posting updates, tools, reminders, etc.).