openclaw - ✅(Solved) Fix docs/discord: bot-to-bot messaging — guild users list is primary gate, "bot:" prefix in allowFrom not recognized [1 pull requests, 2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#58010Fetched 2026-04-08 01:54:54
View on GitHub
Comments
2
Participants
2
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
commented ×2cross-referenced ×1

Two undocumented behaviors make bot-to-bot Discord messaging very difficult to configure correctly, with silent failures at every step.


Error Message

Configuring multi-agent / bot-to-bot setups on Discord requires discovering both of these behaviors through trial and error, with no helpful error messages at any step. Both the allowBots docs and the allowFrom docs should be updated to call out these requirements explicitly.

Root Cause

Two undocumented behaviors make bot-to-bot Discord messaging very difficult to configure correctly, with silent failures at every step.


PR fix notes

PR #59904: Docs: clarify Discord bot allowlists

Description (problem / solution / changelog)

Issue: #58010

Summary:

  • Clarify that Discord guild messaging is gated by guilds.<id>.users before allowBots applies.
  • Clarify that allowFrom does not accept a bot: prefix; bot IDs should be listed as bare IDs.

Validation:

  • pnpm exec oxfmt --check .worktrees/58010/docs/channels/discord.md

Changed files

  • docs/channels/discord.md (modified, +2/-0)

Code Example

Blocked discord guild sender ${sender.id} (not in users/roles allowlist)

---

"guilds": {
  "<guild_id>": {
    "users": ["human_user_id", "sending_bot_id"]
  }
}

---

"allowFrom": ["user:1234567890", "bot:9876543210"]

---

"allowFrom": ["user:1234567890", "9876543210"]

---

"channels": {
  "discord": {
    "accounts": {
      "receiving-bot": {
        "token": "...",
        "allowBots": "mentions",
        "allowFrom": ["user:HUMAN_ID", "SENDING_BOT_ID"],
        "guilds": {
          "GUILD_ID": {
            "users": ["HUMAN_ID", "SENDING_BOT_ID"]
          }
        }
      }
    }
  }
}
RAW_BUFFERClick to expand / collapse

Summary

Two undocumented behaviors make bot-to-bot Discord messaging very difficult to configure correctly, with silent failures at every step.


Issue 1: guilds.<id>.users is the primary access gate — bot IDs must be added here

When guilds.<id>.users is a non-empty array, it acts as a strict allowlist evaluated before allowBots or allowFrom. Any sender ID not in this list is silently dropped.

Failure message seen in gateway logs:

Blocked discord guild sender ${sender.id} (not in users/roles allowlist)

This is not mentioned in the allowBots documentation. A user following the docs (allowBots: "mentions" + allowFrom) will still get silent failures if their guild has a non-empty users list.

Fix: Add the sending bot's ID to guilds.<id>.users:

"guilds": {
  "<guild_id>": {
    "users": ["human_user_id", "sending_bot_id"]
  }
}

Issue 2: "bot:" prefix in allowFrom is not a valid prefix

It is natural to try listing bot IDs in allowFrom with a bot: prefix:

"allowFrom": ["user:1234567890", "bot:9876543210"]

This silently fails. DISCORD_OWNER_ALLOWLIST_PREFIXES only recognizes discord:, user:, and pk:. The bot: prefix gets slug-normalized and treated as a display name, which never matches since dangerouslyAllowNameMatching is off by default.

Fix: Use bare ID (no prefix) for bot IDs in allowFrom:

"allowFrom": ["user:1234567890", "9876543210"]

Full Working Config for Bot-to-Bot Messaging

"channels": {
  "discord": {
    "accounts": {
      "receiving-bot": {
        "token": "...",
        "allowBots": "mentions",
        "allowFrom": ["user:HUMAN_ID", "SENDING_BOT_ID"],
        "guilds": {
          "GUILD_ID": {
            "users": ["HUMAN_ID", "SENDING_BOT_ID"]
          }
        }
      }
    }
  }
}

Impact

Configuring multi-agent / bot-to-bot setups on Discord requires discovering both of these behaviors through trial and error, with no helpful error messages at any step. Both the allowBots docs and the allowFrom docs should be updated to call out these requirements explicitly.

Environment

  • OpenClaw version: 2026.3.24 → 2026.3.28 (both affected)
  • Platform: Ubuntu 24.04 LTS
  • Use case: multi-agent setup with two OpenClaw bots communicating via Discord mentions

extent analysis

Fix Plan

To resolve the issues with bot-to-bot Discord messaging, follow these steps:

  • Add the sending bot's ID to guilds.<id>.users in the configuration:
"guilds": {
  "<guild_id>": {
    "users": ["human_user_id", "sending_bot_id"]
  }
}
  • Use bare ID (no prefix) for bot IDs in allowFrom:
"allowFrom": ["user:1234567890", "9876543210"]
  • Ensure allowBots is set to "mentions":
"allowBots": "mentions"
  • Update the full configuration to include these changes:
"channels": {
  "discord": {
    "accounts": {
      "receiving-bot": {
        "token": "...",
        "allowBots": "mentions",
        "allowFrom": ["user:HUMAN_ID", "SENDING_BOT_ID"],
        "guilds": {
          "GUILD_ID": {
            "users": ["HUMAN_ID", "SENDING_BOT_ID"]
          }
        }
      }
    }
  }
}

Verification

To verify that the fix worked, test the bot-to-bot messaging setup by sending a message from one bot to another via Discord mentions. Check the gateway logs for any error messages indicating silent failures.

Extra Tips

  • Make sure to update the documentation for allowBots and allowFrom to include these requirements explicitly.
  • When configuring multi-agent setups, ensure that all bot IDs are added to the guilds.<id>.users list and use bare IDs in allowFrom.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix docs/discord: bot-to-bot messaging — guild users list is primary gate, "bot:" prefix in allowFrom not recognized [1 pull requests, 2 comments, 2 participants]