← Back to blog
Setup guide14 min readMarch 2026

OpenClaw Discord setup (2026): connect your AI operator to Discord

Discord is the second most popular OpenClaw channel — especially for teams, community builders, and operators who already spend significant time there. This guide covers the full setup: creating a bot, configuring permissions, connecting to OpenClaw, and making Discord your daily command surface.

Quick answer

Create a Discord application at discord.com/developers/applications → create a bot → enable Privileged Gateway Intents → copy the bot token to your .env file → invite the bot to your server → configure the channel ID in OpenClaw → restart the gateway → test. Total setup time: about 20 minutes.

Why Discord works well for OpenClaw

Telegram is often the simpler choice for solo operators, but Discord has real advantages in certain setups:

Teams and shared access: multiple people can interact with the same OpenClaw instance through a shared Discord server, with different channels for different workflows.
Community builders: if you run a Discord community, OpenClaw can participate as a bot — answering questions, moderating, or providing research support.
Structured channels: Discord's channel structure lets you organize different types of bot interaction — one channel for briefs, another for research, another for team updates.
Already-open context: if you have Discord open throughout your day for other reasons, adding your operator there means zero context-switching to interact with it.
Rich formatting: Discord supports markdown and embeds natively, which makes structured outputs (tables, code blocks, formatted reports) render cleanly.
Discord and Telegram are both excellent choices. The right one depends on where you already are — pick the channel you will actually check without thinking about it.

Step 1: Create a Discord application and bot

Go to discord.com/developers/applications and log in with your Discord account
Click New Application in the top right
Give it a name (e.g., "RoloClaw Operator" or your assistant's name) and click Create
In the left sidebar, click Bot
Click Add Bot → Yes, do it
Set a username for the bot (can match the application name)
Optionally upload a profile picture for the bot

Your bot is created. Do not close this page — you need the token in the next step.

Step 2: Get the bot token and configure intents

The bot token is the credential that lets OpenClaw authenticate as your Discord bot. Treat it like a password — it should never be committed to a repository or shared publicly.

On the Bot page, click Reset Token (or "Copy" if it is your first time)
Copy the token immediately and save it — it will only be shown once
Add it to your .env file: DISCORD_BOT_TOKEN=your_token_here
Verify .env is in your .gitignore before any git operations

Enable Privileged Gateway Intents — these are required for the bot to read messages:

Scroll down to Privileged Gateway Intents on the Bot page
Enable Presence Intent
Enable Server Members Intent
Enable Message Content Intent — this is critical; without it, the bot cannot read message content
Click Save Changes
If you skip enabling Message Content Intent, the bot will appear connected but will not be able to read what users send. This is the most common Discord setup mistake.

Step 3: Invite the bot to your server

The bot needs to be in your Discord server before OpenClaw can use it. Generate an invite link with the correct permissions:

In the left sidebar, click OAuth2 → URL Generator
Under Scopes, check: bot and applications.commands
Under Bot Permissions, check: Send Messages, Read Message History, Embed Links, Attach Files, Use Slash Commands
Copy the generated URL at the bottom of the page
Open the URL in your browser and select the Discord server to add the bot to
Click Authorize

The bot should now appear in your server member list. It will show as offline until OpenClaw connects to it.

Step 4: Get the server and channel IDs

OpenClaw needs to know which server and channel to monitor. To get these IDs:

In Discord, go to User Settings → Advanced → enable Developer Mode
Right-click your Discord server name → Copy Server ID — this is your Guild ID
Right-click the channel you want OpenClaw to monitor → Copy Channel ID
Save both IDs — you will need them in the next step

If you want OpenClaw to respond in multiple channels, collect all the relevant channel IDs now.

Step 5: Configure OpenClaw

Now connect everything in your OpenClaw configuration. The exact format depends on your OpenClaw version, but the key fields are:

Discord plugin configuration (example)

token: your bot token (from .env)
guildId: your server ID
allowedChannels: array of channel IDs the bot should monitor
allowedUsers: optional — restrict which user IDs can trigger responses

Set allowedChannels to limit the bot to specific channels — without this, it may respond to all messages across all channels in the server
Set allowedUsers if you want the bot to only respond to specific people (recommended for personal operator setups)
Verify the bot token in your config matches the one in your .env file

Step 6: Restart and test

Restart the OpenClaw gateway: openclaw gateway restart
Check the gateway logs for any Discord connection errors
In the configured Discord channel, send a simple test message: "Hello" or "What is today's date?"
The bot should respond within a few seconds
If the bot appears online but does not respond, verify the channel ID is in the allowed channels list and that Message Content Intent is enabled

If the connection is successful, the bot will show as online in your Discord server.

Setting up Discord channels for different workflows

One of Discord's advantages over Telegram is the ability to create dedicated channels for different types of interaction. A practical setup for an operator might look like:

#operator-briefs

Daily and weekly automated reports arrive here. Read-only for humans; the bot posts here on a schedule.

#operator-requests

Where you type requests and questions. The bot monitors this channel and responds here.

#operator-research

Research outputs, synthesis, and documents. Keeps research separate from conversational messages.

#operator-logs

System events, workflow completions, and monitoring alerts. Useful for debugging without cluttering the main channel.

This structure is optional — many operators just use one channel for everything — but it becomes useful once you have more than two or three automated workflows running regularly.

Model routing for Discord messages

Discord messages often contain a mix of message types: quick questions, substantive requests, and automated workflow outputs. A practical routing rule:

Quick questions and message acknowledgments: Claude Haiku 3.5 — fast, low cost
Research requests, complex questions: Claude Sonnet 4 — when quality matters
Automated briefs and reports: phi4-mini or llama3.2 (local) — high frequency, no API cost
Code review or technical analysis: qwen2.5-coder:14b (local) or Claude Sonnet 4

If you do not want to set up explicit routing yet, defaulting to Claude Haiku 3.5 for all Discord messages is a reasonable starting point that keeps costs low while maintaining useful quality.

Discord vs Telegram: which to use for OpenClaw

Choose Telegram if:

You are a solo operator. You want the simplest possible setup. You check Telegram on your phone daily. You want a private personal operator interface.

Choose Discord if:

You are part of a team sharing the same instance. You run or participate in Discord communities. You prefer channel-organized workflows. You already have Discord open daily.

There is no wrong answer — both work well. The right choice is the one you will actually use consistently. If you already have Discord open all day for other reasons, adding your operator there costs nothing in habit formation.

It is also possible to run both simultaneously — Telegram for personal operator use and Discord for team or community-facing workflows. The OpenClaw gateway can connect to multiple channels at once.

Common Discord setup problems and fixes

Bot shows as online but does not respond: check that Message Content Intent is enabled in the Developer Portal. This is the most common cause. Also verify the channel ID is in allowedChannels.
Bot shows as offline after gateway restart: verify the bot token in your config is correct and has not expired. Reset the token in the Developer Portal and update your .env if needed.
Bot responds to some messages but not others: check the allowedUsers configuration. If set, the bot will only respond to listed user IDs.
"Invalid Token" error in gateway logs: the token is wrong or has been reset. Go to Developer Portal → Bot → Reset Token and update your .env and config.
Bot not appearing after invite: verify the bot was added to the correct server and that it has at minimum Send Messages permission in the target channel.
Rate limit errors: Discord has per-bot rate limits. If you are sending many automated messages, add a small delay between messages or batch them. Automated reports should not trigger this under normal conditions.

Improving your Discord setup over time

Once the basic connection is working, these improvements make the Discord setup more useful:

Add slash commands: configure OpenClaw to respond to slash commands (like /brief or /research) for cleaner interaction than plain text messages
Set up automated briefs: configure a cron job or heartbeat to post the morning brief to a dedicated #briefs channel at 7:30 AM — no manual prompting required
Create a webhook for one-way notifications: for automated outputs that do not require two-way conversation (monitoring alerts, weekly reviews), a webhook is simpler than the full bot connection
Configure role-based access: in a team setup, use Discord roles to control which team members can prompt the operator vs which can only read its outputs
Add the bot to a private thread: for sensitive workflows, create a private Discord thread and add only the bot and the relevant team members — keeps the output isolated from broader server activity

Read this next

Want the complete setup path — channels, memory, models, and workflows — in one place?

The RoloClaw starter system covers the full OpenClaw setup including channel connection, memory files, model routing, and first workflows in one practical guide.

Best for: builders who want to get Discord connected and everything else working in one focused afternoon.
You get: channel setup guidance, memory file templates, model routing defaults, and first workflow starting points — all in one place.
Why buy: the real cost is not the guide. It is the three weeks of trial-and-error before the setup finally feels stable.

FAQ

How do I connect OpenClaw to Discord? Create a Discord application and bot at discord.com/developers/applications, enable Privileged Gateway Intents (especially Message Content Intent), copy the bot token to your .env file, invite the bot to your server, configure the channel ID in OpenClaw, and restart the gateway.
What Discord permissions does OpenClaw need? Privileged Gateway Intents: Message Content Intent, Server Members Intent, Presence Intent. Bot permissions: Send Messages, Read Message History, Embed Links, Attach Files.
Is Discord or Telegram better for OpenClaw? Telegram is simpler for solo personal use. Discord is better for teams, community setups, and when you already spend significant time in Discord. Both work well as a primary command surface.
Can I use OpenClaw in a Discord server with other people? Yes. Configure allowedChannels and optionally allowedUsers to control where and for whom the bot responds.
How do I restrict OpenClaw to certain Discord channels? Set the allowedChannels field in the Discord plugin configuration to an array of specific channel IDs.
What should I use Discord for in OpenClaw? Team coordination, community-facing workflows, automated reports and briefs, and as a shared command surface when multiple people use the same instance.
How do I keep my Discord bot token secure? Store in .env only. Add .env to .gitignore. Never commit. If exposed, reset immediately in the Discord Developer Portal — this invalidates the old token instantly.