Discord 配置指南
适合 DM + 服务器频道。默认建议先完成 DM pairing,再开启 guild 工作流。
1) 前置准备
- Discord Developer Portal 权限
- 创建 Bot 并复制 Bot Token
- 开启 Message Content Intent(必需)
- 建议开启 Server Members Intent(更稳定的用户匹配)
2) 快速配置
openclaw config set channels.discord.token '"YOUR_BOT_TOKEN"' --json
openclaw config set channels.discord.enabled true --json
openclaw gateway
如果网关已在后台运行,请改用 openclaw gateway restart。
3) 首次 Pairing
openclaw pairing list discord
openclaw pairing approve discord <CODE>
Pairing code 默认 1 小时过期。
4) 常见问题(官方高频)
- Bot 在线但 guild 无回复:检查 groupPolicy / guild allowlist / Message Content Intent。
- DM 无回复:检查 dmPolicy 是否为 disabled,或 pairing 是否未批准。
- 需要完整排障请看 Channel Troubleshooting。