OpenClaw + Discord — Native Channel Setup (Verified Config)

Discord is one of OpenClaw's native channels — here is the exact config block that works, the bot-intent toggle people forget, and how access pairing behaves.

⚡ Skip the boilerplate

A ready-made SOUL.md already knows the Discord playbook — copy it, start your agent, ship today.

Want every guide + every template? Complete Bundle — $29 best value

First, the honest part: is Discord an OpenClaw channel?

Discord is a native OpenClaw channel. The key is channels.discord, the token is a SecretRef pointing at an environment variable, and there is no separate “integration” step — you configure the channel and restart the gateway.

Most “OpenClaw + X” write-ups online get this wrong: they paste a channels: block for a tool OpenClaw has no adapter for. OpenClaw accepts that key silently (its config schema allows extra channel keys) and then nothing happens — no token, no webhook, no error. That is the single most common reason a “connected” agent stays silent.

What you can actually build with Discord

How OpenClaw connects to Discord

A native channel means OpenClaw owns the transport: it opens the gateway connection, maintains the session, routes messages into your agent and sends the replies back. You do not write a bot script and you do not add an MCP server.

Whichever path you take, the agent still needs a personality and a job description. A bare API key tells OpenClaw it may call Discord; a SOUL.md tells it when to call it and what a good answer looks like. Skipping that step is why most integrations produce impressive demos and nothing else.

Credentials

🔐 Scope it down. Create a bot (not an OAuth2 app) and keep the token in the environment, never in the config file. OpenClaw reads it through a SecretRef, so the token never lands in openclaw.json.

Setup

Step 1 — Create the bot and copy its token

In the Discord developer portal, open Applications → your app → Bot, click Reset Token, and copy it. Then enable the two message intents the bot needs — MESSAGE_CONTENT (privileged) and, if you use guild features, GUILD_MESSAGES. A privileged intent must be toggled in the portal and confirmed in the Bot page's intent section; missing this is the classic “bot joins but sees nothing” failure.

Step 2 — Add the channel to openclaw.json

Patch the config so the token is referenced, not inlined. The shape below is taken from the OpenClaw Discord docs — token is a SecretRef object, not a string.

Step 3 — Restart the gateway and verify

Channel changes need a gateway restart (openclaw gateway restart). Then send a message mentioning your bot in a server where it has the right permissions. Open the OpenClaw logs — you want to see the channel connect, not just a silent no-op.

Copy-paste config

{
  channels: {
    discord: {
      enabled: true,
      token: {
        source: "env",
        provider: "default",
        id: "DISCORD_BOT_TOKEN",
      },
    },
  },
}

The raw API call underneath

If you would rather not route through a Discord channel at all, Discord's REST API works from any agent runtime with a bearer token:

curl -s https://discord.com/api/v10/users/@me \
  -H "Authorization: Bot $DISCORD_BOT_TOKEN" \
  | head -c 200

Gotchas that cost people an afternoon

  1. The privileged intent is the #1 cause of silence. MESSAGE_CONTENT must be enabled twice: in the portal's intent toggle and in the Bot page. If it is off, the bot receives only system events and replies to nothing.
  2. A token pasted straight into config is a leak. Use the SecretRef form above and keep the value in the environment (or ~/.openclaw/.env) so the value never appears in a config file you might paste into a chat.
  3. Changing a channel needs a restart. The schema marks channel reloads as restart, not hot reload. Editing config and waiting is not a strategy.
  4. Pairing is on by default. Unknown senders are held until approved. That is the safe default, but it means a “broken bot” is often just an unapproved user.
  5. Discord rate limits are per-route, not per-hour. A run that fires fifty messages in a second gets 429s with a retry_after; back off and batch instead of firing in a loop.

FAQ

Does OpenClaw need a Discord application ID as well as the token?

No. The token is enough for a single account. The Discord docs' accounts map exists for running the same bot under several identities — most people never need it.

Can the agent read channels it was not invited to?

No. It can only see what the bot's permissions allow. Invite it with the narrowest role that still covers the channels you want it to answer in.

Can I use one Discord bot for several channels with different personalities?

Yes — route them to different agents via channel routing rules and give each agent its own SOUL.md. That is the pattern the Complete Bundle covers.

Where to start

Three paths, cheapest first. The free pack is the fastest way to see the whole agent workflow end to end; the bundle is where the multi-channel setup patterns live.

Before you wire anything up, work through the free deployment checklist — it is the rollout order that keeps a half-configured agent from eating your quota.

🔥 Get All 10 Premium Products for $29 Save 70% with the Complete Bundle
Get Bundle → Free Deployment Checklist →