2.9 KiB
2.9 KiB
read_when, summary, title, x-i18n
| read_when | summary | title | x-i18n | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
`openclaw channels` 的 CLI 参考(账号、状态、登录/登出、日志) | channels |
|
openclaw channels
管理 Gateway 上的聊天渠道账号及其运行时状态。
相关文档:
常用命令
openclaw channels list
openclaw channels status
openclaw channels capabilities
openclaw channels capabilities --channel discord --target channel:123
openclaw channels resolve --channel slack "#general" "@jane"
openclaw channels logs --channel all
添加/移除账号
openclaw channels add --channel telegram --token <bot-token>
openclaw channels remove --channel telegram --delete
提示:openclaw channels add --help 可查看各渠道的专用参数(token、app token、signal-cli 路径等)。
登录/登出(交互式)
openclaw channels login --channel whatsapp
openclaw channels logout --channel whatsapp
故障排除
- 运行
openclaw status --deep进行全面探测。 - 使用
openclaw doctor获取引导式修复。 openclaw channels list输出Claude: HTTP 403 ... user:profile→ 用量快照需要user:profile权限范围。使用--no-usage,或提供 claude.ai 会话密钥(CLAUDE_WEB_SESSION_KEY/CLAUDE_WEB_COOKIE),或通过 Claude Code CLI 重新认证。
能力探测
获取提供商能力提示(可用的 intents/scopes)以及静态功能支持:
openclaw channels capabilities
openclaw channels capabilities --channel discord --target channel:123
说明:
--channel是可选的;省略时将列出所有渠道(包括扩展)。--target接受channel:<id>或原始数字频道 ID,仅适用于 Discord。- 探测因提供商而异:Discord intents + 可选的频道权限;Slack bot + 用户权限范围;Telegram bot 标志 + webhook;Signal 守护进程版本;MS Teams 应用令牌 + Graph 角色/权限范围(已知的会标注)。无探测功能的渠道会报告
Probe: unavailable。
将名称解析为 ID
使用提供商目录将渠道/用户名称解析为 ID:
openclaw channels resolve --channel slack "#general" "@jane"
openclaw channels resolve --channel discord "My Server/#support" "@someone"
openclaw channels resolve --channel matrix "Project Room"
说明:
- 使用
--kind user|group|auto强制指定目标类型。 - 当多个条目共享相同名称时,解析优先选择活跃的匹配项。