Discord
Discord operations via the message tool. Send messages, react, manage channels, roles, moderation, and rich UI with components v2.
Discord is one of OpenClaw's primary communication channels, turning your AI agent into a Discord bot that can send messages, react, manage channels, run polls, create threads, search history, and display rich UI with Discord's components v2 system.
The integration works through OpenClaw's `message` tool with `channel: "discord"`. There's no separate Discord tool — everything flows through the unified messaging interface. This means the same patterns you use for Telegram or Slack work for Discord, with Discord-specific features (components v2, thread management, presence) available as additional options.
Setup involves creating a Discord application with a bot in the Discord Developer Portal, adding it to your server with appropriate permissions, and configuring the bot token in `openclaw.json`. The integration supports multi-account setups via `accountId` for managing multiple bots.
Discord's rich features are well-supported: components v2 for interactive buttons and layouts (preferred over legacy embeds), thread creation for organized discussions, polls with configurable duration and multi-select, message search across channels, and presence/status updates. Some actions (roles, moderation, presence, channels) are gated behind `channels.discord.actions.*` configuration for safety.
For OpenClaw users, Discord is often the primary interface — it's where they chat with their AI assistant, spawn coding agents in threads, and receive notifications. The ACP harness integration means you can spawn persistent Claude Code or Codex sessions directly in Discord threads.
Best suited for: OpenClaw users who live in Discord, community managers automating moderation, developers using Discord as their AI assistant interface, teams collaborating with AI agents in shared servers.
Tags: discord, messaging, chat, community
Category: Messaging
Use Cases
- Primary AI assistant interface: chat with your agent in Discord
- Spawn coding agents in threads for organized development work
- Community moderation: auto-moderate with AI assistance
- Team notifications: push alerts, summaries, and reports to channels
- Polls and voting for quick team decisions
- Rich status updates with components v2 layouts
Tips
- Use components v2 instead of embeds for rich UI — it's Discord's modern approach
- Use `silent: true` to send messages without triggering notifications
- Prefer explicit IDs (guildId, channelId, messageId) over names for reliability
- For ACP harness requests (Codex/Claude Code in a thread), use sessions_spawn with runtime:acp and thread:true
- Wrap multiple links in <> to suppress Discord's automatic embeds
- Use polls for quick team decisions — they're native and interactive
- Search across channels with the search action to find old conversations
Known Issues & Gotchas
- Avoid Markdown tables in Discord messages — they don't render properly. Use bullet lists instead.
- Don't combine components v2 with legacy embeds — Discord rejects mixed v1/v2
- Some actions (roles, moderation, presence, channels) are gated and default to OFF
- Bot needs appropriate permissions in the server — check Intents and OAuth2 scopes
- Mention users as <@USER_ID>, not @username — Discord requires the ID format
- Rate limits apply — avoid tight loops of message sends
- Thread-bound ACP sessions should use sessions_spawn, not message tool's thread-create
Alternatives
- Telegram
- Slack
- Matrix (Element)
Community Feedback
Discord OpenClaw: Build Your Own AI Discord Bot. Step 1: install OpenClaw, Step 2: create Discord application and bot, Step 3: set up privileges.
— CyberNews
How to Set Up a Personal AI Agent with OpenClaw and Discord. Open the Discord Developer Portal, create a new application, add a bot, copy the token.
— Dev.to
How to Self-Host OpenClaw for Clawdbot AI Agent. Create a Discord Bot, connect it to your self-hosted instance.
— Pinggy Blog
Configuration Examples
OpenClaw Discord channel config
{
"channels": {
"discord": {
"token": "your-bot-token",
"actions": {
"roles": false,
"moderation": false,
"presence": false,
"channels": false
}
}
}
}Send a message to a channel
message action:send channel:discord to:"channel:123456789" message:"Hello from OpenClaw!" silent:trueCreate a poll
message action:poll channel:discord to:"channel:123" pollQuestion:"What for lunch?" pollOption:["Pizza","Sushi","Salad"] pollDurationHours:24Installation
# Configure channels.discord.token in openclaw.jsonSource: bundled