#Discord DM - multiple agents?

1 messages · Page 1 of 1 (latest)

tulip raven
#

Can I DM my other agents other than the "main" agent in Discord? I am not talking about group channels, but rather DM (direct message) to more than one agent in Discord.

Thanks in advance, Krill.

karmic kettleBOT
#

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

zinc thunderBOT
#

Short answer: yes, but not with one single Discord DM bot identity.

For Discord, each inbound message is routed to one agent (deterministic routing).
So if you want to DM “multiple agents,” the clean setup is:

  1. Create multiple Discord bot accounts (channels.discord.accounts.<id>)
  2. Bind each accountId to a different agentId in top-level bindings
  3. DM the specific bot for that agent

With one bot + one DM chat, you don’t dynamically pick different agents per message.

Docs:

If you want, I can give you a paste-ready openclaw.json example for main + coding Discord DM bots.

tulip raven
#

Oh yes please give me the openclaw.json example

zinc thunderBOT
#

Perfect — here’s a clean openclaw.json example for two Discord DM bots, each mapped to a different agent.

{
agents: {
list: [
{
id: "main",
default: true,
workspace: "~/.openclaw/workspace-main",
},
{
id: "coding",
workspace: "~/.openclaw/workspace-coding",
},
],
#
},

// Route each Discord account (bot) to a different agent
bindings: [
{ agentId: "main", match: { channel: "discord", accountId: "default" } },
{ agentId: "coding", match: { channel: "discord", accountId: "coding" } },
],

channels: {
discord: {
enabled: true,
defaultAccount: "default",
dmPolicy: "pairing",

accounts: {
#
default: {
token: {
source: "env",
provider: "default",
id: "DISCORD_BOT_TOKEN_MAIN",
},
dmPolicy: "pairing",
},
coding: {
token: {
source: "env",
provider: "default",
id: "DISCORD_BOT_TOKEN_CODING",
},
dmPolicy: "pairing",
#
},
},
},
},
}

Then set env + restart:

export DISCORD_BOT_TOKEN_MAIN="..."
export DISCORD_BOT_TOKEN_CODING="..."
openclaw gateway restart

Then DM each bot once and approve each pairing code (account-scoped):

tulip raven
#

Ok configuration completed. But in Discord somehow I only see the DM of one of the bot. How do I "invite" my other bot to appear on my DM list of friends in Discord?

zinc thunderBOT
#

Yep — this is normal Discord behavior.

You can’t “friend invite” bots into your DM list directly.
A bot appears in your DM list only after you start a DM with it.

Do this for the 2nd bot:

  1. Make sure the 2nd bot is actually in at least one server you’re in
    (invite it via its own OAuth URL from its own Discord app).
  2. In that server, open member list → right-click the bot → Message.
  3. Send any message (like hi) — then it will show in your DM list.

If “Message” isn’t available

  • Enable server privacy setting: Allow Direct Messages from server members (for that server).
  • Make sure the bot is online/connected from OpenClaw.

Quick checks:

#
openclaw channels status --probe
openclaw pairing list --channel discord

If you want, I can also give you a quick checklist to verify both Discord accounts (default + coding) are live in one shot.