CLI commands
ไดเรกทอรี
openclaw directory
การค้นหาไดเรกทอรีสำหรับช่องทางที่รองรับ (ผู้ติดต่อ/เพียร์, กลุ่ม และ "me")
แฟล็กทั่วไป
--channel <name>: id/นามแฝงของช่องทาง (จำเป็นเมื่อกำหนดค่าหลายช่องทาง; อัตโนมัติเมื่อกำหนดค่าไว้เพียงช่องทางเดียว)--account <id>: id บัญชี (ค่าเริ่มต้น: ค่าเริ่มต้นของช่องทาง)--json: ส่งออก JSON
หมายเหตุ
directoryมีไว้เพื่อช่วยคุณค้นหา ID ที่สามารถวางในคำสั่งอื่นได้ (โดยเฉพาะopenclaw message send --target ...)- สำหรับหลายช่องทาง ผลลัพธ์อิงตามการกำหนดค่า (allowlists / กลุ่มที่กำหนดค่าไว้) ไม่ใช่ไดเรกทอรีของผู้ให้บริการแบบสด
- Plugin ช่องทางที่ติดตั้งไว้ยังสามารถไม่รองรับไดเรกทอรีได้; ในกรณีนั้นคำสั่งจะรายงานการดำเนินการไดเรกทอรีที่ไม่รองรับแทนการติดตั้ง Plugin ใหม่
- เอาต์พุตเริ่มต้นคือ
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(DM),1234567890-1234567890@g.us(กลุ่ม),120363123456789@newsletter(เป้าหมายขาออกของช่องทาง/จดหมายข่าว) - Signal: นามแฝงที่กำหนดค่าไว้จะแปลงเป็นเป้าหมาย DM แบบ E.164/UUID หรือเป้าหมายกลุ่ม
group:<id> - Telegram:
@usernameหรือ id แชตแบบตัวเลข; กลุ่มเป็น id แบบตัวเลข - Slack:
user:U…และchannel:C… - Discord:
user:<id>และchannel:<id> - Matrix (plugin):
user:@user:server,room:!roomId:serverหรือ#alias:server - Microsoft Teams (plugin):
user:<id>และconversation:<id> - Zalo (plugin): id ผู้ใช้ (Bot API)
- Zalo Personal /
zalouser(plugin): id เธรด (DM/กลุ่ม) จากzca(me,friend list,group list)
ตัวเอง ("me")
openclaw directory self --channel zalouserเพียร์ (ผู้ติดต่อ/ผู้ใช้)
openclaw directory peers list --channel zalouseropenclaw directory peers list --channel zalouser --query "name"openclaw directory peers list --channel zalouser --limit 50กลุ่ม
openclaw directory groups list --channel zalouseropenclaw directory groups list --channel zalouser --query "work"openclaw directory groups members --channel zalouser --group-id <id>ที่เกี่ยวข้อง
Was this useful?