Discord

Discord bot integration with DMs, server channels, threads, reactions, slash commands, voice transcription, and forum support.

Discord is OpenClaw's most feature-rich channel integration, purpose-built for users who want their AI agent embedded in a full workspace environment. Using the official Discord gateway and bot API, OpenClaw connects as a standard Discord bot with support for DMs, server channels, threads, forums, reactions, slash commands, voice transcription, and inline buttons. The setup follows Discord's standard bot creation flow: create an application in the Developer Portal, enable privileged intents (Message Content is required), generate an invite URL with the right permissions, and add the bot to your server. OpenClaw's pairing system then handles DM authorization — send a message to the bot, get a code, approve it. The entire process takes about 10 minutes. What makes Discord special for OpenClaw is the guild workspace concept. You can configure your private Discord server so each channel becomes its own agent session with its own context. Thread support means conversations stay organized, and forum channels let you create structured knowledge bases. Slash commands provide a native Discord UX for common operations, and the bot's streaming responses use edit-in-place just like Telegram. Discord excels for community and team setups. Role-based access control, per-channel tool policies, and multi-server support make it ideal for running different agent configurations across different communities. Voice channel transcription means your agent can participate in voice discussions. The main trade-off versus Telegram is a more complex initial setup and Discord's occasional API rate limits on edits.

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: pairing

Guild 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: allowlist

Installation

Built-in (bundled with OpenClaw)