2.1 KiB
2.1 KiB
summary, read_when
| summary | read_when | ||
|---|---|---|---|
| CLI reference for `moltbot directory` (self, peers, groups) |
|
moltbot directory
Directory lookups for channels that support it (contacts/peers, groups, and “me”).
Common flags
--channel <name>: channel id/alias (required when multiple channels are configured; auto when only one is configured)--account <id>: account id (default: channel default)--json: output JSON
Notes
directoryis meant to help you find IDs you can paste into other commands (especiallymoltbot message send --target ...).- For many channels, results are config-backed (allowlists / configured groups) rather than a live provider directory.
- Default output is
id(and sometimesname) separated by a tab; use--jsonfor scripting.
Using results with message send
moltbot directory peers list --channel slack --query "U0"
moltbot message send --channel slack --target user:U012ABCDEF --message "hello"
ID formats (by channel)
- WhatsApp:
+15551234567(DM),1234567890-1234567890@g.us(group) - Telegram:
@usernameor numeric chat id; groups are numeric ids - Slack:
user:U…andchannel:C… - Discord:
user:<id>andchannel:<id> - Matrix (plugin):
user:@user:server,room:!roomId:server, or#alias:server - Microsoft Teams (plugin):
user:<id>andconversation:<id> - Zalo (plugin): user id (Bot API)
- Zalo Personal /
zalouser(plugin): thread id (DM/group) fromzca(me,friend list,group list)
Self (“me”)
moltbot directory self --channel zalouser
Peers (contacts/users)
moltbot directory peers list --channel zalouser
moltbot directory peers list --channel zalouser --query "name"
moltbot directory peers list --channel zalouser --limit 50
Groups
moltbot directory groups list --channel zalouser
moltbot directory groups list --channel zalouser --query "work"
moltbot directory groups members --channel zalouser --group-id <id>