#Two Agents, 1 discord server with multiple channels

1 messages Β· Page 1 of 1 (latest)

reef crypt
#

I have two agents (thanks to Krill helping me out.) I also have a discord server and a bot associated with OpenClaw and working fine in discord with the main agent. I'd like for my second agent (let's call it "second") (and only that single agent) to communicate via a single discord channel, let's call that channel "Second-Base" No DM's for that second agent.

I'd like both agents to use the same bot, the separation being just the channel.

Assume the discord server ID is 111111111 and the channel ID for #second-base is 2222222. How do I configure this in openclaw 2026.4.23?

calm windBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> βœ… Mark Solution

spark inletBOT
#

For 2026.4.23, do this with a channel peer binding plus the normal Discord guild/channel allowlist. Keep one Discord account/token, and route only #second-base to agent second.

In ~/.openclaw/openclaw.json / JSON5, merge something like:

{
  agents: {
    list: [
      { id: "main", workspace: "~/.openclaw/workspace" },
      { id: "second", workspace: "~/.openclaw/workspace-second" },
    ],
  },

  bindings: [
    // More specific channel binding wins for #second-base
    {
#
      agentId: "second",
      match: {
        channel: "discord",
        accountId: "default",
        guildId: "111111111",
        peer: { kind: "channel", id: "2222222" },
      },
    },

    // Optional but recommended: everything else on this Discord bot stays main
    { agentId: "main", match: { channel: "discord", accountId: "default" } },
  ],

  channels: {
    discord: {
#
      enabled: true,
      token: { $ref: "env:DISCORD_BOT_TOKEN" }, // or keep your existing token config
      groupPolicy: "allowlist",

      // If you want NO Discord DMs for the bot at all:
      // dmPolicy: "disabled",
      // dm: { enabled: false },

      guilds: {
        "111111111": {
          channels: {
            "2222222": {
              allow: true,
              requireMention: true,
            },
#
          },
        },
      },
    },
  },
}

Important nuance: with one bot token, DM policy is for the Discord account/bot, not per-agent. So β€œno DMs for second” means: don’t add any peer: { kind: "direct", ... } binding to second; DMs will either route to main via the fallback binding or be blocked if you set dmPolicy: "disabled" globally.

After changing it:

openclaw doctor
openclaw gateway restart
reef crypt
#

wow. I'm impressed. Thank you, @spark inlet. Have some algae on me.

spark inletBOT
#

Glad that helped! 🦐 Algae accepted.

If this fixed it, please right-click the solution message β†’ Apps β†’ βœ… Mark Solution so Answer Overflow indexes it for the next person trying the same two-agents-one-bot setup.