OpenClaw on Discord: Your AI Agent Inside Your Server
Discord hit 700 million registered users in 2026. It's where builders, DAOs, gaming communities, and dev teams already live. So why open a separate chat window for your AI agent? This guide gets OpenClaw running inside Discord β channels, roles, commands, automations β in under 10 minutes.
Why Discord as an Agent Interface
Most AI agent setups are single-player. One person, one chat window, one model. That works fine for personal automation β but it breaks down the moment you want to share the agent with a team, a DAO, or a community.
Discord fixes this. When you connect OpenClaw to a Discord server, you get:
Multi-user access
Get the weekly AI agent digest π¦
What's shipping in AI tools, every Monday. No fluff.
Your whole team can interact with the agent from the same server β no shared passwords, no proxies.
Channel separation
Get the weekly AI agent digest π¦
What's shipping in AI tools, every Monday. No fluff.
Route different use cases to different channels. #research for web searches, #automation for cron jobs, #general for anything.
Role-based control
Get the weekly AI agent digest π¦
What's shipping in AI tools, every Monday. No fluff.
Restrict who can run elevated commands, approve shell ops, or trigger automations β using Discord's native role system.
Persistent history
Get the weekly AI agent digest π¦
What's shipping in AI tools, every Monday. No fluff.
Every agent interaction is logged in your Discord server. Full audit trail, searchable, shareable.
π― The killer use case
Crypto DAO + OpenClaw on Discord = governance research agent that anyone in the server can query, cron jobs that post daily briefs to #announcements, and an approval flow that pings core contributors before executing anything sensitive. This is what "community-owned AI infrastructure" actually looks like.
Step 1: Create Your Discord Bot
You need a Discord application with a bot token. This takes 3 minutes. Do it once.
Open Discord Developer Portal
Go to discord.com/developers/applications and click "New Application". Give it a name β this becomes your bot's name in the server.
Create the Bot
In the left sidebar, click "Bot". Hit "Add Bot". Copy the bot token β you'll need this. Never share it.
Set Bot Permissions
Under "Bot" settings, enable: Send Messages, Read Message History, Add Reactions, Use Slash Commands, Manage Messages (for editing).
Generate Invite URL
Go to OAuth2 β URL Generator. Select "bot" and "applications.commands". Choose the permissions above. Copy the URL.
Add to Your Server
Open the invite URL in a browser. Select your server and authorize. The bot will appear offline until OpenClaw connects.
β οΈ Token security
Your bot token is equivalent to a password. Store it in your OpenClaw config only β never in .env files committed to git, never in Discord messages, never in logs. If it leaks, regenerate immediately in the Developer Portal.
Step 2: Configure OpenClaw
Once you have your bot token, wiring it into OpenClaw takes two config changes. Open ~/.openclaw/config.yaml:
# ~/.openclaw/config.yaml β minimal Discord config
channel:
kind: discord
token: "your-bot-token-from-developer-portal"
# Who can interact with the agent
allowedUsers:
- "123456789012345678" # your Discord user ID (18-digit)
- "987654321098765432" # teammate 1
- "111222333444555666" # teammate 2
# Optional: restrict to specific channels
allowedChannels:
- "1098765432109876543" # #ai-agent channel ID
- "2098765432109876543" # #automation channel ID
# Optional: require specific role for commands
allowedRoles:
- "3098765432109876543" # "AI Access" role ID
reactions: minimal # emoji reactions on repliesTo get your user ID: in Discord, go to Settings β Advanced β enable Developer Mode. Then right-click any user and click "Copy User ID". Same for channel IDs (right-click a channel β Copy Channel ID) and role IDs (right-click a role β Copy Role ID).
# Apply the config and restart
# Validate config (no restart yet) openclaw gateway config.get # Apply and restart openclaw gateway restart # Check it's connected openclaw gateway status # β channel: discord β connected # β guild: Your Server Name # β bot: YourBotName#1234
Your bot should now show as online in your Discord server. Try messaging it directly in an allowed channel.
Channel Routing & Permissions
The most powerful part of the Discord integration is channel routing. You can set up different channels for different agent behaviors β and use Discord's native permission system to control who can do what.
Recommended channel structure for a builder/team server:
#ai-generalOpen to all members. Casual queries, research, quick lookups. No approval flow.
#ai-automationRestricted to admins. Create/manage cron jobs, trigger multi-step automations.
#ai-approvalsWhere the bot sends elevated command approval requests. Only core team can approve.
#ai-logsRead-only channel where cron job results and automation outputs are posted.
#ai-devDeveloper-only. Sub-agent spawning, ACP coding sessions, verbose mode debugging.
# Full channel routing config example
channel:
kind: discord
token: "your-token"
# Default: respond in any allowed channel
allowedChannels:
- "1111111111111111111" # #ai-general
- "2222222222222222222" # #ai-automation
- "3333333333333333333" # #ai-dev
# Elevated commands only from these channels
elevatedChannels:
- "3333333333333333333" # #ai-dev only
# Cron job results posted here
notificationChannel: "4444444444444444444" # #ai-logs
# Approval requests sent here
approvalChannel: "5555555555555555555" # #ai-approvalsSlash Commands & Reactions
OpenClaw registers a set of Discord slash commands automatically on startup. These work anywhere the bot has access β just type / to see the autocomplete list.
/statusSession health β model, token usage, cost estimate. Works in any channel the bot can read.
/model <name>Switch the active LLM. Tab-autocomplete shows available models. Changes take effect on the next message.
/clearClear conversation context. Memory.md and skills are preserved. Use when the agent is confused.
/reasoningToggle extended thinking mode. Replies take longer but significantly better on complex analysis.
/approve <code>Approve a pending elevated command. The code comes from the bot's approval request message.
/cron listList all scheduled cron jobs with their next run times. Works in any allowed channel.
/subagentsList running sub-agents. Add kill <id> to terminate a specific agent.
Reaction Shortcuts
With reactions: full in your config, you can react to any bot message with an emoji to trigger actions:
Confirm / proceed with the last suggestion
Reject / try a different approach
Re-run the last command or query
Copy the response to clipboard (desktop only)
Pause an ongoing operation
Delete the bot message and clear that turn
Team Automation Patterns
This is where Discord + OpenClaw gets genuinely powerful. These are the automation patterns that active communities are running right now.
Pattern 1: Daily Crypto Brief to #announcements
Scheduled digest posted to a read-only channel every morning
# In #ai-automation channel, tell the agent: "Every weekday at 8am Europe/Belgrade, fetch BTC, ETH, and SOL prices + top 3 crypto headlines, format it nicely and post to #announcements channel ID 4444444444444444444" # Agent creates: # β Cron job: morning-crypto-brief # Schedule: 0 8 * * 1-5 # Channel: #announcements # Next run: Monday 8:00 AM
The entire DAO wakes up to a fresh brief. No API keys to share, no Zapier subscription, no custom bot. Just OpenClaw.
Pattern 2: GitHub PR Monitor for Dev Teams
Scan open PRs every few hours, ping reviewers when needed
# Setup via natural language: "Every 4 hours, check open PRs on org/repo-name. If any PR is older than 24h with no review, post in #engineering and @mention the assigned reviewer" # Result in #engineering channel: π PR Review Needed β feat: add Discord integration (#247) Author: @marcdev | Age: 28h | No reviewers @alice_reviews β your turn π
Integrates with the GitHub skill. Works on any repo you have access to. No webhooks to configure.
Pattern 3: Research-on-Demand for Any Member
@mention the bot in any allowed channel for instant research
# Any server member in #ai-general: @YourBot what's the current circulating supply of RNDR and how has it changed in the last 30 days? # Bot responds with sourced research in-thread # No API key needed by the member # No ChatGPT subscription needed # Logged in #ai-logs for team reference
You become the team's infrastructure. One OpenClaw instance, shared with the people you choose, on the platform they already use.
Pattern 4: Moderation + Safety Assistant
The bot watches for issues and surfaces them to mods
# Tell the agent: "Monitor #trading-discussion every 30 min. If anyone posts a wallet address or seed phrase (looks like 12 random words), immediately post a warning in that channel and alert @mods role in #mod-chat" # Protects your community from social engineering attacks # No custom code, no webhooks # Just a cron job + OpenClaw awareness
Especially valuable for crypto communities where seed phrase scams are common. A $20/mo OpenClaw host running this automation has prevented real losses.
What the Community Is Saying
The OpenClaw Discord community β plus threads on Hacker News after the GuppyLM Show HN went viral today β has been active on the topic of embedded AI agents. Here's what's resonating:
βWe run three Discord servers for our DAO. Having one OpenClaw instance that serves all three with different channel configs is exactly the setup I wanted. The multi-guild support landed last month and it's been stable.β
@zara_dao
βThe approval flow in Discord hits different from Telegram. In Telegram it's just you. In Discord, the whole team can see the approval request. That transparency changes how people think about what the agent is doing.β
@devkev_eth
βSet up the GitHub PR monitor for our startup last week. We had 4 PRs sitting for 3+ days that people forgot about. First day the bot ran, all 4 got reviewed. That's not an AI gimmick β that's actual leverage.β
@sara_infra
βPeople keep asking "why not just use a custom Discord bot?" β because with OpenClaw you get web search, memory, file access, cron scheduling, and LLM switching all wired together. A custom bot is code. This is infrastructure.β
@alex_builds
βRunning this on a $6/month VPS. The whole community interacts with it. My infra cost for "team AI" is literally less than a single Claude Pro subscription. The economics are absurd.β
@pete_depin
Troubleshooting
Most Discord integration issues fall into one of four buckets:
π§ Bot shows as offline
Check that your bot token is correct in config.yaml. Run openclaw gateway status. If it reports "disconnected", try openclaw gateway restart. If the token itself is wrong, regenerate in Developer Portal.
π§ Bot online but not responding to messages
Check allowedUsers includes your Discord user ID (Developer Mode β right-click yourself β Copy User ID). Also verify the channel ID is in allowedChannels β if that array exists, only listed channels work.
π§ Slash commands not showing up
Slash commands can take up to 1 hour to propagate globally. For faster results, register them guild-specific: add guildId to your Discord config. Guild commands update instantly.
π§ Missing permissions errors
Go to Server Settings β Integrations β your bot β check its channel permissions. The bot needs: Send Messages, Read Message History, Add Reactions, Use Application Commands in each channel it should work in.
π§ Cron job notifications not posting
Verify notificationChannel in your config matches the correct channel ID. Also check the bot has Send Messages permission in that specific channel (not just the server-wide role).
Go Live: Your First 10 Minutes
Here's the exact sequence to go from zero to a working OpenClaw Discord bot with your first automation running:
# Full setup sequence β copy and adapt
# 1. Create bot at discord.com/developers/applications
# Copy your bot token
# 2. Add to config
cat >> ~/.openclaw/config.yaml << 'EOF'
channel:
kind: discord
token: "YOUR_BOT_TOKEN"
allowedUsers:
- "YOUR_DISCORD_USER_ID"
reactions: minimal
EOF
# 3. Restart OpenClaw
openclaw gateway restart
# 4. Verify in Discord β message the bot:
# "hello, what's today's date and your model?"
# 5. Create your first automation:
# "Every day at 9am, check Hacker News top 5 stories
# and post a summary here in this channel"
# 6. Verify the cron job was created:
/cron list
# 7. Test it now:
# "Run the HN brief job right now"π What you've just built
A private AI agent embedded in your Discord server. It can browse the web, run code, manage files, send notifications, and execute scheduled tasks β for you and your team, on infrastructure you control, at a fraction of the cost of any SaaS alternative.
Get the AI Adaptation Playbook
12 pages. 5 frameworks. 6 copy-paste workflows. Everything you need to future-proof your career with AI.
Instant delivery Β· No spam Β· Unsubscribe anytime