跳转到内容

directory

针对支持它的频道 (联系人/对等体, 群组, 和 “我”) 的目录查找。

  • --channel <name>: 频道 ID/别名 (配置多个频道时需要; 仅配置一个时自动)
  • --account <id>: 账户 ID (默认: 频道默认值)
  • --json: 输出 JSON
  • directory 旨在帮助您查找可以粘贴到其他命令 (特别是 openclaw message send --target ...) 中的 ID。
  • 对于许多频道,结果是基于配置的 (白名单 / 配置的群组) 而不是实时提供商目录。
  • 默认输出是 id (有时是 name) 用制表符分隔;使用 --json 进行脚本编写。
Terminal window
openclaw directory peers list --channel slack --query "U0"
openclaw message send --channel slack --target user:U012ABCDEF --message "hello"
  • 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 (me, friend list, group list) 的线程 ID (私信/群组)
Terminal window
openclaw directory self --channel zalouser
Terminal window
openclaw directory peers list --channel zalouser
openclaw directory peers list --channel zalouser --query "name"
openclaw directory peers list --channel zalouser --limit 50
Terminal window
openclaw directory groups list --channel zalouser
openclaw directory groups list --channel zalouser --query "work"
openclaw directory groups members --channel zalouser --group-id <id>