π― 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.).