openclaw directory
針對支援目錄查詢的頻道進行查找(聯絡人/同儕、群組和「我」)。
常用旗標
--channel <name>:頻道 id/別名(設定多個頻道時為必要;只設定一個頻道時自動選取)--account <id>:帳號 id(預設:頻道預設帳號)--json:輸出 JSON
注意事項
directory的用途在於幫你找到可以貼到其他指令的 ID(特別是openclaw message send --target ...)。- 對多數頻道而言,結果來自設定資料(白名單 / 已設定的群組)而非即時的供應商目錄。
- 預設輸出為以 tab 分隔的
id(有時包含name);腳本使用時請搭配--json。
搭配 message send 使用查詢結果
openclaw directory peers list --channel slack --query "U0"
openclaw message send --channel slack --target user:U012ABCDEF --message "hello"
ID 格式(依頻道)
- WhatsApp:
+15551234567(私訊)、[email protected](群組) - Telegram:
@username或數字 chat 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(外掛程式):user id(Bot API)
- Zalo Personal /
zalouser(外掛程式):來自zca的 thread id(私訊/群組)(me、friend list、group list)
自身(「me」)
openclaw directory self --channel zalouser
同儕(聯絡人/使用者)
openclaw directory peers list --channel zalouser
openclaw directory peers list --channel zalouser --query "name"
openclaw directory peers list --channel zalouser --limit 50
群組
openclaw directory groups list --channel zalouser
openclaw directory groups list --channel zalouser --query "work"
openclaw directory groups members --channel zalouser --group-id <id>