跳转到主要内容

Documentation Index

Fetch the complete documentation index at: https://docs.openclaw.ai/llms.txt

Use this file to discover all available pages before exploring further.

openclaw directory

用于支持目录查找的渠道(联系人/对等方、群组和 “me”)。

常用标志

  • --channel <name>:渠道 ID/别名(配置了多个渠道时必需;仅配置一个时自动使用)
  • --account <id>:账号 ID(默认:渠道默认值)
  • --json:输出 JSON

说明

  • directory 用于帮助你找到可粘贴到其他命令中的 ID(尤其是 openclaw message send --target ...)。
  • 对于许多渠道,结果由配置支持(允许列表/已配置群组),而不是实时提供商目录。
  • 已安装的渠道插件仍然可以省略目录支持;在这种情况下,命令会报告不支持的目录操作,而不是重新安装插件。
  • 默认输出是用制表符分隔的 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(私信)、1234567890-1234567890@g.us(群组)、120363123456789@newsletter(Channel/Newsletter 外发目标)
  • Telegram:@username 或数字聊天 ID;群组是数字 ID
  • Slack:user:U…channel:C…
  • Discord:user:<id>channel:<id>
  • Matrix(插件):user:@user:serverroom:!roomId:server#alias:server
  • Microsoft Teams(插件):user:<id>conversation:<id>
  • Zalo(插件):用户 ID(Bot API)
  • Zalo Personal / zalouser(插件):来自 zca 的会话串 ID(私信/群组)(mefriend listgroup 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>

相关内容