From 9c22a0133b60f95334d04cdb48089322684500f1 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Thu, 30 Apr 2026 01:31:34 +0100 Subject: [PATCH] docs(discord): clarify application id account scope --- docs/channels/discord.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/docs/channels/discord.md b/docs/channels/discord.md index ddb41ac5255..a3b3daa0ef9 100644 --- a/docs/channels/discord.md +++ b/docs/channels/discord.md @@ -115,7 +115,7 @@ openclaw gateway If OpenClaw is already running as a background service, restart it via the OpenClaw Mac app or by stopping and restarting the `openclaw gateway run` process. For managed service installs, run `openclaw gateway install` from a shell where `DISCORD_BOT_TOKEN` is present, or store the variable in `~/.openclaw/.env`, so the service can resolve the env SecretRef after restart. - If your host is blocked or rate-limited by Discord's startup application lookup, set `channels.discord.applicationId` to the application's client ID from the Developer Portal so startup can skip that REST call. + If your host is blocked or rate-limited by Discord's startup application lookup, set the Discord application/client ID from the Developer Portal so startup can skip that REST call. Use `channels.discord.applicationId` for the default account, or `channels.discord.accounts..applicationId` when you run multiple Discord bots. @@ -153,6 +153,28 @@ DISCORD_BOT_TOKEN=... For scripted or remote setup, write the same JSON5 block with `openclaw config patch --file ./discord.patch.json5 --dry-run` and then rerun without `--dry-run`. Plaintext `token` values are supported. SecretRef values are also supported for `channels.discord.token` across env/file/exec providers. See [Secrets Management](/gateway/secrets). + For multiple Discord bots, keep each bot token and application ID under its account. A top-level `channels.discord.applicationId` is inherited by accounts, so only set it there when every account should use the same application ID. + +```json5 +{ + channels: { + discord: { + enabled: true, + accounts: { + personal: { + token: { source: "env", provider: "default", id: "DISCORD_PERSONAL_TOKEN" }, + applicationId: "111111111111111111", + }, + work: { + token: { source: "env", provider: "default", id: "DISCORD_WORK_TOKEN" }, + applicationId: "222222222222222222", + }, + }, + }, + }, +} +``` +