通过官方 Discord Gateway 支持 DM 和服务器频道。

快速设置

  1. 在 Discord Developer Portal 创建应用和 Bot
  2. 启用特权 Intent:Message Content Intent(必须)、Server Members Intent(推荐)
  3. 生成邀请 URL(OAuth2 → bot + applications.commands)
  4. 将 Bot 添加到服务器
{
  channels: {
    discord: {
      enabled: true,
      botToken: "your-bot-token",
      dmPolicy: "pairing",
      guilds: {
        "*": { requireMention: true },
      },
    },
  },
}
openclaw gateway
openclaw pairing list discord
openclaw pairing approve discord <CODE>

环境变量

DISCORD_BOT_TOKEN=...

线程支持

Discord 线程使用独立 Session Key:agent:main:discord:channel:<id>:thread:<threadId>

相关

  • concepts/channels-overview — Channel 总览