🎯 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.).