Discord
stable
A self-hosted Discord AI bot powered by Claude, GPT, or Pi. Per-server agents, per-channel bindings, ACK reactions, Components v2 buttons. MIT licensed.
openclaw apps install discord Discord is where communities live. openclawOS turns a single bot into a per-server AI assistant — moderation, summaries, code review, Q&A, all gated by guild and channel.
Why Discord on openclawOS?
- Multiple agents, one bot identity. Bindings let you route different channels to different Pi loops.
- ACK reactions. Pi can react with ✅ before fully replying so users know it’s working.
- Components v2. Buttons, selects, multi-step flows — Pi emits them when it needs structured input.
- Threads + forum posts. Sessions can scope to a thread automatically, so each forum post becomes its own conversation.
- No webhook URL needed. The bot connects via the standard Discord gateway WebSocket.
Setup
- Create a bot at https://discord.com/developers/applications. Copy the token.
- Run
openclaw apps install discordand paste the token. - Invite the bot to your server with the OAuth URL the CLI prints.
- Pi responds to mentions, DMs, or commands per your binding.
Default intents are minimal — message content access requires the privileged Message Content intent, which Discord requires you to enable in the developer portal for bots over 100 servers.
Bindings by scope
Discord bindings can match on:
guildId— a specific serverchannelId— a specific channel or categorythreadId— threads automatically scope sessionsroleId— only respond to users with a specific rolemention— only when @-mentionedprefix— old-school!askstyle triggers
Combine these freely. Want a #engineering Pi that responds to mentions, plus a #general Pi that only triggers on !ask? Two bindings, same bot.
Slash commands
Out of the box, Pi registers:
/ask <prompt>— one-shot question/new— start a fresh session/summary— compact the current session/agents— list configured agents
You can disable any of these per-guild.
Per-server isolation
Each Discord guild gets its own session namespace. Pi’s memory does not bleed across servers — a user asking the same question in two different guilds gets two separate sessions. Identity bridging (e.g. across Discord and iMessage for the same human) is opt-in via identity linking.
Moderation hooks
Pi can act as a moderation co-pilot: classify messages, summarise reports, flag for human review. The binding can pre-process every message through a fast classifier and only route the interesting ones to a heavy model, saving tokens.
Common questions
Yes. Bindings scope by guild ID, channel ID, or role. Run a coding Pi in #engineering, a moderation Pi in #general, a vibes Pi in #lounge — all on the same Gateway, separate sessions.
Run Discord through your own Pi.
Install openclawOS, pair this channel, message your agent. The whole loop is under five minutes.