Docs
Set Up Your Discord Bot in 5 Minutes

Set Up Your Discord Bot in 5 Minutes

Connect ClawCloud to Discord and start messaging your AI agent in the server you already use. Step-by-step from bot creation to first reply.

Your ClawCloud agent lives in Discord — it's where you message it, where it sends alerts, where it posts results. This guide walks through creating a Discord bot, connecting it to your ClawCloud deployment, and sending your first message.

What you'll build

By the end of this guide:

  • A Discord bot in your server that forwards messages to your ClawCloud agent
  • The bot responds with Claude AI answers in the same channel
  • Alerts and proactive messages from your agent arrive in Discord automatically

Step 1: Create a Discord Application

  1. Go to discord.com/developers/applications
  2. Click New Application → give it a name (e.g. "My Agent" or "Claw")
  3. Navigate to Bot in the left sidebar
  4. Click Add Bot → confirm
  5. Under Privileged Gateway Intents, enable:
    • Message Content Intent
    • Server Members Intent ✅ (optional, for member context)
  6. Click Reset Token → copy the token

⚠️ Never share your bot token in public channels. If it's exposed, reset it immediately in the Developer Portal.

Step 2: Add the bot to your server

  1. In the Developer Portal, go to OAuth2 → URL Generator
  2. Select scopes: bot
  3. Select bot permissions: Administrator (simplest) or at minimum: Read Messages, Send Messages, Read Message History, Add Reactions
  4. Copy the generated URL and open it in your browser
  5. Select your Discord server and authorize

Step 3: Connect to ClawCloud

During the ClawCloud setup wizard:

  1. Select Discord as your channel
  2. Paste the bot token when prompted
  3. Enter the Channel ID where the bot should listen (right-click a channel → Copy Channel ID)
  4. Complete Claude OAuth

The wizard writes your token to your server's openclaw config and starts the gateway with Discord connected.

Step 4: Send your first message

Message your bot directly in Discord:

"Hello — what can you do?"

The bot will reply with a list of its capabilities. You're connected.

Useful commands to try first

What's the weather today?
Summarize what I should focus on today
Open https://clawcloud.ai and screenshot the homepage
List files in my workspace

Setting up a dedicated AI channel

For cleaner organization, create a dedicated channel (e.g. #ai-agent or #claw) and configure your bot to only respond there:

  1. In your ClawCloud dashboard, update the channel configuration
  2. Set the bot's channel ID to your new #ai-agent channel
  3. The bot ignores messages in other channels

This keeps AI conversation separate from team chat while keeping it accessible in the same server.

Proactive messages and alerts

Your agent can send unprompted messages — morning briefings, sales alerts, task completion notices. These always land in your configured Discord channel.

To enable the morning briefing:

"Send me a morning briefing at 7am EST every weekday: weather, calendar, any flagged emails, and a task suggestion"

Your agent will set this up as a recurring task. At 7am, it posts in your channel automatically.

Troubleshooting

Bot doesn't respond: Check that Message Content Intent is enabled in the Developer Portal. Without it, the bot receives messages but can't read their content.

Token invalid error: The token may have been exposed (Discord scans and revokes exposed tokens). Go to Developer Portal → Bot → Reset Token, then update it in your ClawCloud dashboard.

Bot offline: Check your server status in the ClawCloud dashboard. If the status shows DEPLOYING, wait for it to reach ACTIVE.


Your agent is in Discord. Message it the way you'd message anyone else.