Discord Setup Guide

Add OpenClaw to your Discord server. About 5 minutes.

тП▒я╕П ~5 minutes

Prerequisites

  • тЬЕ OpenClaw installed and running (Getting Started)
  • тЬЕ 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.

Start Automating Now

You've learned the setup. Sign up and launch your first automation in minutes.

Try OpenClaw Cloud →