Why Discord + OpenClaw?
Discord is where developer communities live. With OpenClaw, your AI agent becomes a full Discord participant — responding to mentions, managing channels, reacting to messages, and running automations.
Step 1: Create a Discord Bot
- Go to the Discord Developer Portal
- Click New Application → name it
- Go to Bot → click Add Bot
- Copy the Bot Token (keep it secret!)
- Enable Message Content Intent under Privileged Intents
Step 2: Invite the Bot
Generate an invite URL with these permissions: - Send Messages - Read Message History - Add Reactions - Use Slash Commands - Manage Messages (optional)
https://discord.com/api/oauth2/authorize?client_id=YOUR_CLIENT_ID&permissions=274877975552&scope=botMaster this topic with hands-on labs
Go beyond reading — build real projects in sandboxed environments with expert video guidance.
Browse Courses →Step 3: Configure OpenClaw
openclaw config set discord.token YOUR_BOT_TOKEN
openclaw gateway restartStep 4: Set Up Channels
Configure which channels your agent monitors:
discord:
token: "YOUR_BOT_TOKEN"
channels:
- id: "123456789"
mode: "mention" # Only respond when mentioned
- id: "987654321"
mode: "all" # Respond to everythingBot Behavior in Groups
OpenClaw agents are smart about group chat participation:
- Respond when directly mentioned or asked a question
- React with emoji when acknowledging without a full reply
- Stay silent during casual banter that doesn't need AI input
- Never dominate the conversation
This is configured in AGENTS.md — your agent follows social norms.
Get weekly IT automation tips
Docker, Ansible, Terraform, MLOps — curated insights delivered to your inbox. No spam.
Subscribe Free →Advanced: Multiple Servers
One OpenClaw instance can serve multiple Discord servers. Each channel can have different modes and permissions.
Troubleshooting
Bot doesn't respond
- Check the bot token is correct
- Verify Message Content Intent is enabled
- Ensure the bot has permission to read/send in the channel
Bot responds to everything
- Switch channel mode to
mentioninstead ofall - Review your
AGENTS.mdgroup chat rules
Slow responses
- Check your LLM API key and quota
- Run
openclaw statusto verify the gateway is healthy
---
Ready to go deeper? Check out our hands-on course: OpenClaw Agent — practical exercises you can follow along on your own machine.
Related
For a production-focused walkthrough, see Luca Berton's guide on the Ansible intelligent assistant and MCP server.
Ready to learn by doing?
Stop reading tutorials — start building. Expert video courses with hands-on labs in real sandboxed environments.
Related Articles
OpenClaw Volume Permissions Fix
Fix OpenClaw Docker volume permission errors. Resolve EACCES issues for named volumes and bind mounts with troubleshooting steps.
Troubleshoot OpenClaw Gateway Errors
Fix OpenClaw gateway errors: 401 unauthorized, connection refused, origin not allowed, and WebSocket failures with resolution guides.
OpenClaw Reverse Proxy with Caddy
Set up HTTPS for OpenClaw using Caddy reverse proxy. Automatic TLS certificates, WebSocket support, and production config.
Deploy OpenClaw with Docker Compose
Step-by-step guide to deploy OpenClaw using Docker Compose. Cover networking, volumes, reverse proxy, and Tailscale setups.
OpenClaw Gateway Bind Modes Guide
Learn OpenClaw gateway bind modes: loopback, lan, tailnet, auto, and custom. Pick the right mode for your network setup.
OpenClaw Heartbeats
Learn how to configure OpenClaw heartbeats for proactive monitoring — email checks, calendar alerts, weather updates, and more.
Explore topics
Browse more articles on the topics covered here.