Discord Setup Guide

Add OpenClaw to your Discord server. About 5 minutes.

⏱️ ~5 minutes

Prerequisites

  • ✅ OpenClaw installed and running (Quick Start)
  • ✅ A Discord account
  • ✅ A Discord server where you have Manage Server permission
  • ✅ About 5 minutes
1

Create a Bot

  1. Go to the Discord Developer Portal
  2. Click New Application → give it a name → Create
  3. In the left sidebar, go to Bot
  4. Click Reset Token → confirm → copy the token
⚠️

The token is only shown once! Copy it right away and save it somewhere safe.

2

Turn On Message Content

Still on the Bot page, scroll down to Privileged Gateway Intents:

  1. Turn ON the Message Content Intent toggle
  2. Click Save Changes
⚠️

If you skip this, your bot will see messages arrive but can't read what they say. This is the most common setup mistake.

3

Invite Bot to Your Server

Generate an invite link with the right permissions:

  1. Go to OAuth2 → URL Generator in the left sidebar
  2. Under Scopes, check: bot and applications.commands
  3. Under Bot Permissions, check:
    • View Channels
    • Send Messages
    • Read Message History
  4. Copy the URL at the bottom and open it in your browser
  5. Pick your server → Authorize
💡

You need Manage Server permission on the server to add bots.

4

Configure OpenClaw

Run the setup wizard and paste your bot token:

openclaw init

Select Discord when prompted, then paste the token from Step 1.

Or edit the config file manually

Add this to ~/.openclaw/config.yaml:

channels:
  discord:
    token: "YOUR_DISCORD_BOT_TOKEN"
    enabled: true
5

Start & Test

Start the gateway:

openclaw gateway start

Open Discord and mention your bot in any channel:

You: @OpenClaw hello!

Bot: Hi! I'm your OpenClaw assistant. How can I help?

🎉

Success! Your Discord bot is now connected to OpenClaw.

+

Bonus: DMs & Channels

By default, the bot responds when mentioned with @YourBot. You can also DM the bot directly — just find it in the server member list and send a message.

💡

Want the bot to respond in specific channels without being mentioned? Check the advanced configuration for auto-respond settings.

Troubleshooting

Bot is online but doesn't respond

Make sure Message Content Intent is turned on (Step 2). This is the #1 issue.

Bot not showing in the server

Re-check the invite URL. Make sure you selected both bot and applications.commands scopes.

Invalid token error

Go back to the Developer Portal → Bot → Reset Token to generate a new one. Update your config.

Bot responds slowly

This is normal for the first message. Subsequent messages should be faster.