

















@@ -5,9 +5,7 @@ read_when:
55title: "Discord"
66---
778-# Discord (Bot API)
9-10-Status: ready for DMs and guild channels via the official Discord gateway.
8+Ready for DMs and guild channels via the official Discord gateway.
1191210<CardGroup cols={3}>
1311<Card title="Pairing" icon="link" href="/channels/pairing">
@@ -495,60 +493,6 @@ Use `bindings[].match.roles` to route Discord guild members to different agents
495493}
496494```
497495498-## Developer Portal setup
499-500-<AccordionGroup>
501-<Accordion title="Create app and bot">
502-503-1. Discord Developer Portal -> **Applications** -> **New Application**
504-2. **Bot** -> **Add Bot**
505-3. Copy bot token
506-507-</Accordion>
508-509-<Accordion title="Privileged intents">
510-In **Bot -> Privileged Gateway Intents**, enable:
511-512-- Message Content Intent
513-- Server Members Intent (recommended)
514-515-Presence intent is optional and only required if you want to receive presence updates. Setting bot presence (`setPresence`) does not require enabling presence updates for members.
516-517-</Accordion>
518-519-<Accordion title="OAuth scopes and baseline permissions">
520-OAuth URL generator:
521-522-- scopes: `bot`, `applications.commands`
523-524-Typical baseline permissions:
525-526-**General Permissions**
527- - View Channels
528-**Text Permissions**
529- - Send Messages
530- - Read Message History
531- - Embed Links
532- - Attach Files
533- - Add Reactions (optional)
534-535-This is the baseline set for normal text channels. If you plan to post in Discord threads, including forum or media channel workflows that create or continue a thread, also enable **Send Messages in Threads**.
536-Avoid `Administrator` unless explicitly needed.
537-538-</Accordion>
539-540-<Accordion title="Copy IDs">
541-Enable Discord Developer Mode, then copy:
542-543-- server ID
544-- channel ID
545-- user ID
546-547-Prefer numeric IDs in OpenClaw config for reliable audits and probes.
548-549-</Accordion>
550-</AccordionGroup>
551-552496## Native commands and command auth
553497554498- `commands.native` defaults to `"auto"` and is enabled for Discord.
@@ -1188,13 +1132,11 @@ openclaw logs --follow
11881132</Accordion>
11891133</AccordionGroup>
119011341191-## Configuration reference pointers
1135+## Configuration reference
119211361193-Primary reference:
1137+Primary reference: [Configuration reference - Discord](/gateway/configuration-reference#discord).
119411381195-- [Configuration reference - Discord](/gateway/configuration-reference#discord)
1196-1197-High-signal Discord fields:
1139+<Accordion title="High-signal Discord fields">
1198114011991141- startup/auth: `enabled`, `token`, `accounts.*`, `allowBots`
12001142- policy: `groupPolicy`, `dm.*`, `guilds.*`, `guilds.*.channels.*`
@@ -1204,13 +1146,14 @@ High-signal Discord fields:
12041146- reply/history: `replyToMode`, `historyLimit`, `dmHistoryLimit`, `dms.*.historyLimit`
12051147- delivery: `textChunkLimit`, `chunkMode`, `maxLinesPerMessage`
12061148- streaming: `streaming` (legacy alias: `streamMode`), `streaming.preview.toolProgress`, `draftChunk`, `blockStreaming`, `blockStreamingCoalesce`
1207-- media/retry: `mediaMaxMb`, `retry`
1208-- `mediaMaxMb` caps outbound Discord uploads (default: `100MB`)
1149+- media/retry: `mediaMaxMb` (caps outbound Discord uploads, default `100MB`), `retry`
12091150- actions: `actions.*`
12101151- presence: `activity`, `status`, `activityType`, `activityUrl`
12111152- UI: `ui.components.accentColor`
12121153- features: `threadBindings`, top-level `bindings[]` (`type: "acp"`), `pluralkit`, `execApprovals`, `intents`, `agentComponents`, `heartbeat`, `responsePrefix`
121311541155+</Accordion>
1156+12141157## Safety and operations
1215115812161159- Treat bot tokens as secrets (`DISCORD_BOT_TOKEN` preferred in supervised environments).
@@ -1219,10 +1162,23 @@ High-signal Discord fields:
1219116212201163## Related
122111641222-- [Pairing](/channels/pairing)
1223-- [Groups](/channels/groups)
1224-- [Channel routing](/channels/channel-routing)
1225-- [Security](/gateway/security)
1226-- [Multi-agent routing](/concepts/multi-agent)
1227-- [Troubleshooting](/channels/troubleshooting)
1228-- [Slash commands](/tools/slash-commands)
1165+<CardGroup cols={2}>
1166+<Card title="Pairing" icon="link" href="/channels/pairing">
1167+Pair a Discord user to the gateway.
1168+</Card>
1169+<Card title="Groups" icon="users" href="/channels/groups">
1170+Group chat and allowlist behavior.
1171+</Card>
1172+<Card title="Channel routing" icon="route" href="/channels/channel-routing">
1173+Route inbound messages to agents.
1174+</Card>
1175+<Card title="Security" icon="shield" href="/gateway/security">
1176+Threat model and hardening.
1177+</Card>
1178+<Card title="Multi-agent routing" icon="sitemap" href="/concepts/multi-agent">
1179+Map guilds and channels to agents.
1180+</Card>
1181+<Card title="Slash commands" icon="terminal" href="/tools/slash-commands">
1182+Native command behavior.
1183+</Card>
1184+</CardGroup>
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。