通道
“openclaw channels”的 CLI 参考(帐户、状态、登录/注销、日志)
常用命令
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'' 显示每个通道的标志(令牌、应用程序令牌、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 重新身份验证。
能力探测
获取提供程序功能提示(可用的意图/范围)以及静态功能支持:
openclaw channels capabilities openclaw channels capabilities --channel discord --target channel:123
注意事项:
- ''--channel'' 是可选的;省略它会列出每个频道(包括扩展)。
- ''--target'' accepts ''channel:<id>'' or raw numeric channel ID, Discord-only.
- 探测是特定于提供商的:Discord 意图 + 可选通道权限; Slack 机器人 + 用户范围; Telegram 机器人标志 + webhook;信号守护进程版本; MS Teams 应用程序令牌 + 图形角色/范围(在已知的情况下进行注释)。没有探测器的通道报告 ''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'' 强制目标类型。当多个条目共享相同名称时,解析更倾向于活动匹配。