openclaw directory
支持目录查找的频道(联系人/对等方、群组和"我")。
通用标志
--channel <name>:频道 ID/别名(配置多个频道时必需;仅配置一个时自动)--account <id>:账户 ID(默认:频道默认值)--json:输出 JSON
注意事项
directory旨在帮助您找到可以粘贴到其他命令中的 ID(尤其是openclaw message send --target ...)。- 对于许多频道,结果是基于配置的(允许列表/已配置的群组),而不是实时提供商目录。
- 默认输出是
id(有时还有name)以制表符分隔;使用--json进行脚本编写。
将结果与 message send 一起使用
bash
openclaw directory peers list --channel slack --query "U0"
openclaw message send --channel slack --target user:U012ABCDEF --message "hello"ID 格式(按频道分类)
- WhatsApp:
+15551234567(私聊),1234567890-1234567890@g.us(群组) - 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 Personal /
zalouser(插件):来自zca的线程 ID(私聊/群组)(me、friend list、group list)
自身("我")
bash
openclaw directory self --channel zalouser对等方(联系人/用户)
bash
openclaw directory peers list --channel zalouser
openclaw directory peers list --channel zalouser --query "name"
openclaw directory peers list --channel zalouser --limit 50群组
bash
openclaw directory groups list --channel zalouser
openclaw directory groups list --channel zalouser --query "work"
openclaw directory groups members --channel zalouser --group-id <id>