🎯 学习目标:配置多个聊天渠道
| 渠道 | 特点 |
|---|---|
| Telegram | 最简单,Bot API |
| Discord | 服务器/频道/DM |
| 飞书 | 企业常用,WebSocket |
| 需要 QR 配对 | |
| Signal | 隐私优先 |
| iMessage | 仅 macOS |
| Slack | 工作空间应用 |
- 登录 飞书开放平台
- 创建企业自建应用
- 开启机器人能力
- 获取 App ID 和 App Secret
openclaw configure --section feishu或直接编辑配置:
{
"channels": {
"feishu": {
"appId": "cli_xxx",
"appSecret": "xxx"
}
}
}在飞书开放平台配置:
- 消息接收事件
- WebSocket 方式(推荐)
- 登录 Discord Developer Portal
- 创建 Application
- 在 Bot 页面创建 Bot
- 获取 Token
- 生成邀请链接,添加到服务器
openclaw configure --section discord{
"channels": {
"discord": {
"token": "xxx"
}
}
}配置文件中可以同时配置多个渠道:
{
"channels": {
"telegram": {
"token": "xxx"
},
"discord": {
"token": "xxx"
},
"feishu": {
"appId": "xxx",
"appSecret": "xxx"
}
}
}OpenClaw 会同时连接所有配置的渠道。
{
"channels": {
"telegram": {
"token": "xxx",
"allowFrom": ["your_telegram_id"]
}
}
}{
"channels": {
"telegram": {
"token": "xxx",
"groups": {
"*": { "requireMention": true }
}
}
}
}openclaw status- 选择并配置第二个聊天渠道
- 测试两个渠道都能正常工作
- 配置安全限制(allowFrom)
- 使用
openclaw status检查所有渠道