Directory
openclaw directory
Section titled “openclaw directory”支持目录查询的渠道(联系人/对等点、群组和“我”)。
--channel <name>:频道 ID/别名(配置了多个频道时必需;仅配置一个时为自动)--account <id>:账号 ID(默认:频道默认值)--json:输出 JSON
directory旨在帮助您找到可以粘贴到其他命令(尤其是openclaw message send --target ...)中的 ID。- 对于许多渠道,结果是基于配置的(允许列表/已配置群组),而不是实时的提供商目录。
- 已安装的渠道插件可能仍不提供目录支持;在这种情况下,该命令将报告不支持的目录操作,而不是重新安装插件。
- 默认输出为
id(有时为name),以制表符分隔;请使用--json进行脚本编写。
将结果与 message send 配合使用
Section titled “将结果与 message send 配合使用”openclaw directory peers list --channel slack --query "U0"openclaw message send --channel slack --target user:U012ABCDEF --message "hello"ID 格式(按渠道)
Section titled “ID 格式(按渠道)”- WhatsApp:
+15551234567(私信)、[email protected](群组)、120363123456789@newsletter(频道/时事通讯出站目标) - Telegram:
@username或数字聊天 ID;群组为数字 ID - Slack:
user:U…和channel:C… - Discord:
user:<id>和channel:<id> - Matrix(插件):
user:@user:server、room:!roomId:server或#alias:server - Microsoft Teams(插件):
user:<id>和conversation:<id> - Zalo(插件):用户 ID(Bot API)
- Zalo 个人版 /
zalouser(插件):来自zca的会话 ID(私信/群组)(me、friend list、group list)
自己(“我”)
Section titled “自己(“我”)”openclaw directory self --channel zalouser对等点(联系人/用户)
Section titled “对等点(联系人/用户)”openclaw directory peers list --channel zalouseropenclaw directory peers list --channel zalouser --query "name"openclaw directory peers list --channel zalouser --limit 50openclaw directory groups list --channel zalouseropenclaw directory groups list --channel zalouser --query "work"openclaw directory groups members --channel zalouser --group-id <id>