Integration Discord

OpenClaw Discord Bot Setup: Complete Integration Guide

Complete guide to setting up OpenClaw as a Discord bot. Learn how to create a Discord application, configure bot permissions, set up multi-user support, and run multiple instances.

Updated: February 1, 2026 10 min read

Quick Answer

Set up OpenClaw Discord bot: Create a Discord application, create a bot, get the bot token, invite bot to server with permissions, run `openclaw integrations discord`, enter token, and start using. Supports multi-user and multiple instances.

Introduction

Discord is perfect for team collaboration and community servers, and OpenClaw’s Discord integration makes it easy to add an AI assistant to your server. With support for multi-user interactions, slash commands, and server-wide deployment, OpenClaw can become a valuable member of your Discord community.

This guide covers everything you need to set up OpenClaw as a Discord bot, from creating the application to configuring advanced features.

For other chat app integrations, see our guides:

Why Discord?

Discord offers excellent features for AI bots:

  • Slash Commands — Modern command interface
  • Multi-User Support — Handle multiple users simultaneously
  • Server Integration — Works across entire servers
  • Rich Embeds — Beautiful formatted messages
  • Thread Support — Organize conversations
  • Permissions System — Fine-grained access control

Prerequisites

Before setting up Discord integration:

  1. OpenClaw Installed — See installation guide
  2. OpenClaw Configured — Run openclaw onboard to set up your AI model
  3. Discord Account — Active Discord account
  4. Server Access — Permission to add bots to a Discord server
  5. Bot Token — You’ll create this in the next step

Step 1: Create a Discord Application

Create Application

  1. Go to Discord Developer Portal: discord.com/developers/applications
  2. Click “New Application”
  3. Enter a name (e.g., “OpenClaw Assistant”)
  4. Click “Create”

Create Bot

  1. Go to “Bot” section in the left sidebar
  2. Click “Add Bot”
  3. Click “Yes, do it!” to confirm
  4. Copy the bot token — Click “Reset Token” if needed, then copy:
    MTAxMjM0NTY3ODkwMTIzNDU2Nzg5MA.AbCdEf.GhIjKlMnOpQrStUvWxYzAbCdEfGhIjKlMnOpQr

Important: Keep your bot token secret! Never share it publicly.

Configure Bot Settings

In the Bot section:

  • Username — Set bot display name
  • Icon — Upload bot avatar
  • Public Bot — Uncheck if you want private bot
  • Requires OAuth2 Code Grant — Leave unchecked
  • Message Content IntentEnable this (required for message content)
  • Server Members Intent — Enable if you need member info
  • Presence Intent — Enable if you want presence updates

Save Changes after enabling intents.

Step 2: Invite Bot to Server

Generate Invite URL

  1. Go to “OAuth2” → “URL Generator”

  2. Select Scopes:

    • bot
    • applications.commands (for slash commands)
  3. Select Bot Permissions:

    • ✅ Send Messages
    • ✅ Read Message History
    • ✅ Use Slash Commands
    • ✅ Embed Links
    • ✅ Attach Files
    • ✅ Read Messages/View Channels
    • ✅ Manage Messages (optional, for moderation)
    • ✅ Add Reactions (optional)
  4. Copy the generated URL at the bottom

Invite to Server

  1. Open the invite URL in your browser
  2. Select your server from the dropdown
  3. Click “Authorize”
  4. Complete CAPTCHA if prompted

Your bot should now appear in your server’s member list (offline initially).

Step 3: Configure OpenClaw

Run Integration Setup

Start the Discord integration:

openclaw integrations discord

Or use the general integrations command:

openclaw integrations
# Select Discord from the menu

Enter Bot Token

When prompted, paste your bot token:

Enter your Discord bot token: MTAxMjM0NTY3ODkwMTIzNDU2Nzg5MA.AbCdEf...

OpenClaw will verify the token and connect to Discord.

Verify Connection

You should see:

✓ Discord bot connected successfully!
  Bot username: OpenClaw#1234
  Servers: Your Server Name

Check your Discord server—the bot should now show as online.

Step 4: Start Using the Bot

Slash Commands

Discord uses slash commands. Type / in any channel to see available commands:

  • /openclaw — Start a conversation with OpenClaw
  • /help — Get help
  • /email — Check email (if configured)
  • /calendar — View calendar
  • /tasks — List tasks

Direct Messages

You can also DM the bot directly:

  1. Right-click bot in member list
  2. Select “Message”
  3. Send a message like “Hello, can you help me?”

Channel Mentions

Mention the bot in a channel:

@OpenClaw can you check my email?

Advanced Features

Slash Command Registration

OpenClaw automatically registers slash commands. To manually register:

openclaw integrations discord --register-commands

Custom Slash Commands

Create custom slash commands:

openclaw config set discord.commands.email.description "Check your email inbox"
openclaw config set discord.commands.calendar.description "View your calendar"

Multi-User Support

OpenClaw handles multiple users simultaneously:

  • Separate contexts — Each user has their own context
  • User-specific memory — Remembers each user’s preferences
  • Concurrent conversations — Handles multiple users at once

Configure user limits:

openclaw config set discord.maxUsers 100

Thread Support

OpenClaw can create threads for conversations:

openclaw config set discord.threads.enabled true
openclaw config set discord.threads.autoCreate true

This keeps conversations organized in busy channels.

Rich Embeds

OpenClaw sends beautiful formatted messages:

openclaw config set discord.embeds.enabled true
openclaw config set discord.embeds.color "#00ff00"

Reaction Buttons

Add reaction buttons for quick actions:

openclaw config set discord.reactions.enabled true

Users can react to messages for quick responses.

Configuration Options

Server-Specific Settings

Configure settings per server:

openclaw config set discord.servers.SERVER_ID.channel "general"
openclaw config set discord.servers.SERVER_ID.prefix "!"

Response Formatting

Configure message formatting:

openclaw config set discord.format "markdown"

Options:

  • markdown — Rich formatting
  • plain — Plain text
  • embed — Discord embeds

Rate Limiting

Control message rate:

openclaw config set discord.rateLimit 30

Limits to 30 messages per minute per user.

Privacy Settings

Configure privacy:

openclaw config set discord.privacy.dmOnly false
openclaw config set discord.privacy.allowedChannels ["general", "ai-assistant"]

Notification Settings

Control notifications:

openclaw config set discord.notifications.enabled true
openclaw config set discord.notifications.quietHours "22:00-08:00"

Running Multiple Instances

Why Multiple Instances?

You might want multiple OpenClaw instances for:

  • Different servers — Separate instances per server
  • Different models — Different AI models per instance
  • Load balancing — Distribute load across instances

Setup Multiple Instances

  1. Create multiple Discord applications (one per instance)

  2. Configure each instance:

    openclaw config set instance.name "instance1"
    openclaw config set instance.port 3001
  3. Run each instance:

    openclaw --port 3001 --config instance1.json

Process Management

Use pm2 to manage multiple instances:

npm i -g pm2

# Start instance 1
pm2 start openclaw --name "openclaw-1" -- --port 3001

# Start instance 2
pm2 start openclaw --name "openclaw-2" -- --port 3002

pm2 save
pm2 startup

Troubleshooting

Bot Not Responding

If your bot doesn’t respond:

  1. Check bot status:

    openclaw status
  2. Verify token:

    openclaw config get discord.token
  3. Check logs:

    openclaw logs
  4. Verify intents — Ensure Message Content Intent is enabled in Discord Developer Portal

Token Invalid

If you see “token invalid” errors:

  1. Verify token — Check Discord Developer Portal
  2. Regenerate token — Reset token in Developer Portal
  3. Update token:
    openclaw integrations discord

Bot Not Appearing Online

If bot shows as offline:

  1. Check OpenClaw is running:

    openclaw status
  2. Restart OpenClaw:

    openclaw restart
  3. Verify connection:

    openclaw test discord

Slash Commands Not Appearing

If slash commands don’t appear:

  1. Wait a few minutes — Commands can take time to register

  2. Manually register:

    openclaw integrations discord --register-commands
  3. Check permissions — Ensure bot has “Use Slash Commands” permission

Rate Limiting

If you hit rate limits:

  1. Increase rate limit:

    openclaw config set discord.rateLimit 60
  2. Check Discord limits — Discord has API rate limits

  3. Use multiple instances — Distribute load

Permission Errors

If you see permission errors:

  1. Check bot permissions — Ensure bot has required permissions
  2. Check channel permissions — Bot needs access to channels
  3. Re-invite bot — Regenerate invite URL with correct permissions

Security Best Practices

Bot Token Security

  • Keep token secret — Never share publicly

  • Use environment variables:

    export DISCORD_BOT_TOKEN="your-token"
  • Rotate token — Regenerate if compromised in Developer Portal

Server Security

  • Limit permissions — Only grant necessary permissions
  • Restrict channels — Limit bot to specific channels
  • User whitelist — Restrict to specific users:
    openclaw config set discord.allowedUsers ["user1#1234", "user2#5678"]

Data Privacy

  • Local processing — All messages processed locally
  • No cloud storage — Unless explicitly configured
  • Secure storage — Data stored in ~/.openclaw

Advanced Use Cases

Team Collaboration

Use OpenClaw in team servers:

  • Task management — Assign and track tasks
  • Calendar coordination — Schedule meetings
  • Information retrieval — Quick answers for team
  • Documentation — Answer questions about docs

Community Servers

Use in community servers:

  • FAQ bot — Answer common questions
  • Moderation — Assist with moderation
  • Information — Provide server information
  • Entertainment — Fun interactions

Personal Server

Use in personal server:

  • Personal assistant — Manage tasks and calendar
  • Email management — Check and respond to emails
  • Productivity — Track todos and projects

Comparison with Other Platforms

Discord vs Telegram

  • Discord — Better for servers, slash commands
  • Telegram — Better for personal use, simpler

See our Telegram guide for comparison.

Discord vs Slack

  • Discord — Free, better for communities
  • Slack — Better for businesses, more integrations

See our Slack guide for details.

Next Steps

Now that Discord is connected:

  1. Explore Other IntegrationsWhatsApp, Telegram, Slack
  2. Set Up SkillsSkills Library
  3. Configure EmailGmail Integration
  4. Read FAQCommon Questions

Conclusion

Discord integration provides excellent features for team collaboration and community servers. With slash commands, multi-user support, and server-wide deployment, OpenClaw can become a valuable member of your Discord community.

For more help, check our integrations page or FAQ. Happy automating with your Discord bot!

Need help?

Join the OpenClaw community on Discord for support, tips, and shared skills.

Join Discord →