Openclaw Discord Setup

v1.0.0

Configure a Discord Bot as an OpenClaw message channel with token setup, server authorization, and slash command support in 10 minutes.

0· 138·0 current·0 all-time
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
The name/description (Discord bot setup for OpenClaw) aligns with the instructions: creating a Discord app, obtaining a Bot Token and Client ID, adding the bot to a server, and adding entries to ~/.openclaw/config.yaml. All required items are appropriate for the stated task.
Instruction Scope
The SKILL.md directs the user to write the bot token and clientId into ~/.openclaw/config.yaml (expected for this integration). It also suggests using an environment variable (DISCORD_BOT_TOKEN) in production — that env var is mentioned in text but not declared in the registry metadata. No instructions ask the agent to read unrelated system files or exfiltrate data to third-party endpoints.
Install Mechanism
There is no install spec and no code files beyond package.json metadata. Because it's instruction-only, nothing is written to disk by this skill itself and no third-party binaries or downloads are requested.
Credentials
The only sensitive credential in scope is the Discord Bot Token (and clientId). Requesting that token is proportionate to the purpose. However, the guidance recommends storing the token in plaintext config.yaml (which is convenient but sensitive); using environment variables or a secrets store is safer. The registry metadata does not list any required env vars even though the doc references DISCORD_BOT_TOKEN.
Persistence & Privilege
The skill is not marked always:true and does not request system-wide changes beyond editing OpenClaw's own config (~/.openclaw/config.yaml), which is appropriate for configuring a plugin. It does not attempt to modify other skills or global agent settings.
Assessment
This is an instruction-only guide that appears internally consistent. Before following it: (1) do not paste your Bot Token into public places; consider using an environment variable or secrets store rather than plain ~/.openclaw/config.yaml, (2) restrict the bot's permissions and allowedGuildIds to the minimum needed, (3) verify you trust the source (author is unknown and contact info is provided for paid/free remote help — be cautious about sharing tokens), and (4) if you install an actual open-source 'openclaw-discord' plugin later, inspect its code or obtain it from the official OpenClaw repository to ensure it does only what this doc describes. If you want a stricter assessment, provide the actual plugin code or a link to its repository so it can be reviewed.

Like a lobster shell, security has layers — review code before you run it.

discordvk97czqh3ay7vwpdm81625f77wx83a9n7latestvk97czqh3ay7vwpdm81625f77wx83a9n7messagingvk97czqh3ay7vwpdm81625f77wx83a9n7setupvk97czqh3ay7vwpdm81625f77wx83a9n7
138downloads
0stars
1versions
Updated 4w ago
v1.0.0
MIT-0

OpenClaw Discord Setup

10 分钟配置 Discord Bot 作为 OpenClaw 消息渠道。

为什么选 Discord?

  • 社区友好:适合团队/社区运营
  • 免费无限制:消息、语音、文件全免费
  • 功能丰富:Slash 命令、按钮、Embeds
  • 开发者生态:完善的 API 和 SDK

快速配置

Step 1: 创建 Discord 应用

  1. 访问 https://discord.com/developers/applications
  2. 点击 "New Application"
  3. 设置名称(如 "My AI Assistant")
  4. 进入 "Bot" 页面,点击 "Add Bot"
  5. 保存 Token

Step 2: 邀请 Bot 到服务器

在 "OAuth2" > "URL Generator" 中:

  • Scopes: bot, applications.commands
  • Permissions:
    • Send Messages
    • Read Messages
    • Use Slash Commands

复制生成的链接,在浏览器打开,选择服务器授权。

Step 3: 配置 OpenClaw

编辑 ~/.openclaw/config.yaml:

plugins:
  entries:
    - plugin: openclaw-discord
      config:
        botToken: "YOUR_BOT_TOKEN"
        clientId: "YOUR_CLIENT_ID"
        allowedGuildIds:
          - "123456789"  # 服务器 ID

Step 4: 启动 Gateway

openclaw gateway start

Step 5: 测试

在 Discord 频道 @你的 Bot,应该收到 AI 回复。

高级功能

Slash 命令

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

Embed 消息(更美观)

OpenClaw 会自动格式化回复为 Embed 样式。

常见问题

Q: Bot 不响应

A: 检查 Bot Token 是否正确,确保 Bot 在服务器中

Q: "Missing Access" 错误

A: 重新生成邀请链接,确保勾选了必要权限

Q: Slash 命令不显示

A: 命令注册需要时间(最多 1 小时),或重启 Gateway

Q: 如何获取服务器 ID?

A: Discord 设置 > 高级 > 开发者模式,然后右键服务器 > 复制 ID

成本

  • Discord Bot API:完全免费
  • OpenClaw Gateway:本地运行,无费用
  • AI 模型:按使用量计费

安全建议

  1. 不要公开 Bot Token
  2. 定期重新生成 Token
  3. 只允许信任的服务器 ID
  4. 在生产环境使用环境变量
export DISCORD_BOT_TOKEN="your-token-here"

需要帮助?

  • 微信:yanghu_ai
  • Telegram: @yanghu_openclaw
  • 免费远程配置(首次)

Version: 1.0.0 Created: 2026-03-21

Comments

Loading comments...