Skip to content

Commit ff96e41

Browse files
fix(discord): align DiscordAccountConfig.token type with SecretInput (#32490)
Merged via squash. Prepared head SHA: 233aa03 Co-authored-by: scoootscooob <[email protected]> Co-authored-by: joshavant <[email protected]> Reviewed-by: @joshavant
1 parent 44162e7 commit ff96e41

File tree

5 files changed

+7
-3
lines changed

5 files changed

+7
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Docs: https://docs.openclaw.ai
2121
- Discord/thread session lifecycle: reset thread-scoped sessions when a thread is archived so reopening a thread starts fresh without deleting transcript history. Thanks @thewilloftheshadow.
2222
- Discord/presence defaults: send an online presence update on ready when no custom presence is configured so bots no longer appear offline by default. Thanks @thewilloftheshadow.
2323
- Discord/typing cleanup: stop typing indicators after silent/NO_REPLY runs by marking the run complete before dispatch idle cleanup. Thanks @thewilloftheshadow.
24+
- Discord/config SecretRef typing: align Discord account token config typing with SecretInput so SecretRef tokens typecheck. (#32490) Thanks @scoootscooob.
2425
- Discord/voice messages: request upload slots with JSON fetch calls so voice message uploads no longer fail with content-type errors. Thanks @thewilloftheshadow.
2526
- Discord/voice decoder fallback: drop the native Opus dependency and use opusscript for voice decoding to avoid native-opus installs. Thanks @thewilloftheshadow.
2627
- Discord/auto presence health signal: add runtime availability-driven presence updates plus connected-state reporting to improve health monitoring and operator visibility. (#33277) Thanks @thewilloftheshadow.

docs/channels/discord.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ openclaw gateway
133133
DISCORD_BOT_TOKEN=...
134134
```
135135

136+
SecretRef values are also supported for `channels.discord.token` (env/file/exec providers). See [Secrets Management](/gateway/secrets).
137+
136138
</Tab>
137139
</Tabs>
138140

docs/gateway/security/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ Use this when auditing access or deciding what to back up:
200200

201201
- **WhatsApp**: `~/.openclaw/credentials/whatsapp/<accountId>/creds.json`
202202
- **Telegram bot token**: config/env or `channels.telegram.tokenFile`
203-
- **Discord bot token**: config/env (token file not yet supported)
203+
- **Discord bot token**: config/env or SecretRef (env/file/exec providers)
204204
- **Slack tokens**: config/env (`channels.slack.*`)
205205
- **Pairing allowlists**:
206206
- `~/.openclaw/credentials/<channel>-allowFrom.json` (default account)

docs/start/setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ Use this when debugging auth or deciding what to back up:
128128

129129
- **WhatsApp**: `~/.openclaw/credentials/whatsapp/<accountId>/creds.json`
130130
- **Telegram bot token**: config/env or `channels.telegram.tokenFile`
131-
- **Discord bot token**: config/env (token file not yet supported)
131+
- **Discord bot token**: config/env or SecretRef (env/file/exec providers)
132132
- **Slack tokens**: config/env (`channels.slack.*`)
133133
- **Pairing allowlists**:
134134
- `~/.openclaw/credentials/<channel>-allowFrom.json` (default account)

src/config/types.discord.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import type {
1010
} from "./types.base.js";
1111
import type { ChannelHeartbeatVisibilityConfig } from "./types.channels.js";
1212
import type { DmConfig, ProviderCommandsConfig } from "./types.messages.js";
13+
import type { SecretInput } from "./types.secrets.js";
1314
import type { GroupToolPolicyBySenderConfig, GroupToolPolicyConfig } from "./types.tools.js";
1415
import type { TtsConfig } from "./types.tts.js";
1516

@@ -218,7 +219,7 @@ export type DiscordAccountConfig = {
218219
configWrites?: boolean;
219220
/** If false, do not start this Discord account. Default: true. */
220221
enabled?: boolean;
221-
token?: string;
222+
token?: SecretInput;
222223
/** HTTP(S) proxy URL for Discord gateway WebSocket connections. */
223224
proxy?: string;
224225
/** Allow bot-authored messages to trigger replies (default: false). Set "mentions" to gate on mentions. */

0 commit comments

Comments
 (0)