Discord
Discord bot integration with DMs, server channels, threads, reactions, slash commands, voice transcription, and forum support.
Tags: messaging, bot-api, popular, gaming, community
Category: Messaging
Use Cases
- Personal AI workspace with dedicated channels for different projects
- Community knowledge base bot with role-based access control
- Team coding assistant that responds in project-specific channels
- Voice channel transcription and meeting notes automation
- Multi-server deployment with different agent configs per community
- Forum-based Q&A system with threaded agent responses
Tips
- Create a dedicated private server for your personal OpenClaw workspace
- Use the guild workspace feature: each channel becomes its own agent session with isolated context
- Enable Developer Mode early — you'll need IDs for everything
- Set requireMention: true in server channels to avoid the bot responding to every message
- Use threads for long conversations — they keep the main channel clean
- Forum channels work great for structured Q&A with your agent
- Store your bot token in an environment variable, not plaintext in config
- Use slash commands for common operations — they provide autocomplete and discoverability
Known Issues & Gotchas
- You MUST enable Message Content Intent in the Developer Portal or your bot won't receive message text
- Server Members Intent is needed for role-based allowlists and @username resolution
- 'Reset Token' on first use actually generates your token — nothing is being reset despite the label
- The bot can only DM users who share at least one server with it
- Enable Developer Mode in Discord settings to copy server/channel/user IDs (right-click → Copy ID)
- Allow DMs from server members must be ON in your server privacy settings for pairing to work
- Slash commands may take up to an hour to propagate after registration
- Discord rate limits message edits — streaming in very active channels can cause delays
Alternatives
- Telegram
- Slack
- Mattermost
Community Feedback
Discord's thread support makes it perfect for OpenClaw. Each conversation stays in its own thread, so context doesn't bleed between topics.
— Reddit r/openclaw
Discord and other channels show 'plugin not available' error — turned out I needed to restart the gateway after enabling the channel. Simple fix but not obvious.
— Reddit r/openclaw
I was successfully using OpenClaw in Slack, and it was amazing — had it create a channel for every repository in my GitHub account. Discord setup was similar but the guild workspace concept is even better.
— Reddit r/openclaw
The permission setup for Discord is a bit of a maze compared to Telegram, but once it's done, the threading and forum support are unbeatable.
— Reddit r/openclaw
Frequently Asked Questions
Do I need a public URL or server to run the Discord bot?
No. Discord uses a persistent WebSocket connection (Discord Gateway), so OpenClaw connects outbound from your machine. No public URL, port forwarding, or reverse proxy needed.
Why does my bot show online but not respond to messages?
The most common cause is not enabling the Message Content Intent in the Discord Developer Portal. Without it, your bot receives message events but the content field is empty. Enable it under Bot → Privileged Gateway Intents.
Can I use slash commands with OpenClaw on Discord?
Yes. OpenClaw registers native Discord slash commands when configured. Make sure your OAuth2 invite URL includes the applications.commands scope. Commands may take up to an hour to propagate after registration.
How do I set up per-channel agent sessions?
Use the guild workspace feature. Under channels.discord.guilds.<serverId>.channels, configure each channel ID with its own systemPrompt, tools, and policies. Each channel gets an isolated session with its own context.
Does Discord support streaming responses?
Yes. OpenClaw uses edit-in-place streaming on Discord, similar to Telegram. The response message is created and progressively edited as tokens arrive. Note that Discord rate limits edits, so very fast models may see slight delays.
Can my bot join voice channels?
OpenClaw supports voice channel transcription — the bot can listen to voice channels and transcribe speech. It does not currently generate voice output in Discord voice channels.
Configuration Examples
Basic bot with pairing
channels:
discord:
enabled: true
token:
source: env
provider: default
id: DISCORD_BOT_TOKEN
dmPolicy: pairingGuild workspace with per-channel config
channels:
discord:
enabled: true
token:
source: env
provider: default
id: DISCORD_BOT_TOKEN
dmPolicy: allowlist
allowFrom:
- "123456789012345678"
guilds:
"987654321098765432":
enabled: true
requireMention: true
channels:
"111222333444555666":
requireMention: false
systemPrompt: "You are a coding assistant."Multi-server setup
channels:
discord:
enabled: true
token:
source: env
provider: default
id: DISCORD_BOT_TOKEN
dmPolicy: pairing
guilds:
"111111111111111111":
enabled: true
requireMention: false
"222222222222222222":
enabled: true
requireMention: true
groupPolicy: allowlistInstallation
Built-in (bundled with OpenClaw)