Install
openclaw skills install openclaw-discord-setupConfigure a Discord Bot as an OpenClaw message channel with token setup, server authorization, and slash command support in 10 minutes.
openclaw skills install openclaw-discord-setup10 分钟配置 Discord Bot 作为 OpenClaw 消息渠道。
在 "OAuth2" > "URL Generator" 中:
bot, applications.commands复制生成的链接,在浏览器打开,选择服务器授权。
编辑 ~/.openclaw/config.yaml:
plugins:
entries:
- plugin: openclaw-discord
config:
botToken: "YOUR_BOT_TOKEN"
clientId: "YOUR_CLIENT_ID"
allowedGuildIds:
- "123456789" # 服务器 ID
openclaw gateway start
在 Discord 频道 @你的 Bot,应该收到 AI 回复。
plugins:
entries:
- plugin: openclaw-discord
config:
botToken: "xxx"
slashCommands:
- name: "ask"
description: "Ask AI a question"
- name: "clear"
description: "Clear conversation history"
allowedGuildIds:
- "123456789"
- "987654321"
allowDM: true
OpenClaw 会自动格式化回复为 Embed 样式。
A: 检查 Bot Token 是否正确,确保 Bot 在服务器中
A: 重新生成邀请链接,确保勾选了必要权限
A: 命令注册需要时间(最多 1 小时),或重启 Gateway
A: Discord 设置 > 高级 > 开发者模式,然后右键服务器 > 复制 ID
export DISCORD_BOT_TOKEN="your-token-here"
Version: 1.0.0 Created: 2026-03-21