diff --git a/CHANGELOG.md b/CHANGELOG.md index 3dad9c0375f..ac14e4cee53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ Docs: https://docs.openclaw.ai - 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. - 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. - Discord/typing cleanup: stop typing indicators after silent/NO_REPLY runs by marking the run complete before dispatch idle cleanup. Thanks @thewilloftheshadow. +- Discord/config SecretRef typing: align Discord account token config typing with SecretInput so SecretRef tokens typecheck. (#32490) Thanks @scoootscooob. - Discord/voice messages: request upload slots with JSON fetch calls so voice message uploads no longer fail with content-type errors. Thanks @thewilloftheshadow. - Discord/voice decoder fallback: drop the native Opus dependency and use opusscript for voice decoding to avoid native-opus installs. Thanks @thewilloftheshadow. - 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. diff --git a/docs/channels/discord.md b/docs/channels/discord.md index e11ca7dd651..fbeedf16aa9 100644 --- a/docs/channels/discord.md +++ b/docs/channels/discord.md @@ -133,6 +133,8 @@ openclaw gateway DISCORD_BOT_TOKEN=... ``` + SecretRef values are also supported for `channels.discord.token` (env/file/exec providers). See [Secrets Management](/gateway/secrets). + diff --git a/docs/gateway/security/index.md b/docs/gateway/security/index.md index bb9abd16036..4792b20c891 100644 --- a/docs/gateway/security/index.md +++ b/docs/gateway/security/index.md @@ -200,7 +200,7 @@ Use this when auditing access or deciding what to back up: - **WhatsApp**: `~/.openclaw/credentials/whatsapp//creds.json` - **Telegram bot token**: config/env or `channels.telegram.tokenFile` -- **Discord bot token**: config/env (token file not yet supported) +- **Discord bot token**: config/env or SecretRef (env/file/exec providers) - **Slack tokens**: config/env (`channels.slack.*`) - **Pairing allowlists**: - `~/.openclaw/credentials/-allowFrom.json` (default account) diff --git a/docs/start/setup.md b/docs/start/setup.md index d1fbb7edf7e..4b6113743f8 100644 --- a/docs/start/setup.md +++ b/docs/start/setup.md @@ -128,7 +128,7 @@ Use this when debugging auth or deciding what to back up: - **WhatsApp**: `~/.openclaw/credentials/whatsapp//creds.json` - **Telegram bot token**: config/env or `channels.telegram.tokenFile` -- **Discord bot token**: config/env (token file not yet supported) +- **Discord bot token**: config/env or SecretRef (env/file/exec providers) - **Slack tokens**: config/env (`channels.slack.*`) - **Pairing allowlists**: - `~/.openclaw/credentials/-allowFrom.json` (default account) diff --git a/src/config/types.discord.ts b/src/config/types.discord.ts index 2102e31128c..0473fbf42f1 100644 --- a/src/config/types.discord.ts +++ b/src/config/types.discord.ts @@ -10,6 +10,7 @@ import type { } from "./types.base.js"; import type { ChannelHeartbeatVisibilityConfig } from "./types.channels.js"; import type { DmConfig, ProviderCommandsConfig } from "./types.messages.js"; +import type { SecretInput } from "./types.secrets.js"; import type { GroupToolPolicyBySenderConfig, GroupToolPolicyConfig } from "./types.tools.js"; import type { TtsConfig } from "./types.tts.js"; @@ -218,7 +219,7 @@ export type DiscordAccountConfig = { configWrites?: boolean; /** If false, do not start this Discord account. Default: true. */ enabled?: boolean; - token?: string; + token?: SecretInput; /** HTTP(S) proxy URL for Discord gateway WebSocket connections. */ proxy?: string; /** Allow bot-authored messages to trigger replies (default: false). Set "mentions" to gate on mentions. */