docs/cli/message.md
openclaw messageSingle outbound command for sending messages and channel actions (Discord/Google Chat/iMessage/Matrix/Mattermost (plugin)/Microsoft Teams/Signal/Slack/Telegram/WhatsApp).
openclaw message <subcommand> [flags]
Channel selection:
--channel required if more than one channel is configured.discord|googlechat|imessage|matrix|mattermost|msteams|signal|slack|telegram|whatsapp (Mattermost requires plugin)openclaw message resolves the selected channel to its owning plugin when --channel or a channel-prefixed target is present; otherwise it loads configured channel plugins for default-channel inference.Target formats (--target):
...@newsletter)@username, or forum topic target (-1001234567890:topic:42, or --thread-id 42)channel:<id> or user:<id> (or <@id> mention; raw numeric ids are treated as channels)spaces/<spaceId> or users/<userId>channel:<id> or user:<id> (raw channel id is accepted)channel:<id>, user:<id>, or @username (bare ids are treated as channels)+E.164, group:<id>, signal:+E.164, signal:group:<id>, or username:<name>/u:<name>chat_id:<id>, chat_guid:<guid>, or chat_identifier:<id>@user:server, !room:server, or #alias:server19:[email protected]) or conversation:<id> or user:<aad-object-id>Name lookup:
Help or #help are resolved via the directory cache.--channel <name>--account <id>--target <dest> (target channel or user for send/poll/read/etc)--targets <name> (repeat; broadcast only)--json--dry-run--verboseopenclaw message resolves supported channel SecretRefs before running the selected action.--channel is set (or inferred from prefixed targets like discord:...)--account is set (channel globals + selected account surfaces)--account is omitted, OpenClaw does not force a default account SecretRef scopesend
--target, plus --message, --media, or --presentation--media, --presentation, --delivery, --pin, --reply-to, --thread-id, --gif-playback, --force-document, --silent--presentation sends semantic blocks (text, context, divider, buttons, select) that core renders through the selected channel's declared capabilities. See Message Presentation.--delivery accepts delivery hints such as { "pin": true }; --pin is shorthand for pinned delivery when the channel supports it.--force-document (send images and GIFs as documents to avoid Telegram compression)--thread-id (forum topic id)--thread-id (thread timestamp; --reply-to uses the same field)--silent--gif-playback; WhatsApp Channels/Newsletters are addressed with their native @newsletter JID.poll
--target, --poll-question, --poll-option (repeat)--poll-multi--poll-duration-hours, --silent, --message--poll-duration-seconds (5-600), --silent, --poll-anonymous / --poll-public, --thread-idreact
--message-id, --target--emoji, --remove, --participant, --from-me, --target-author, --target-author-uuid--remove requires --emoji (omit --emoji to clear own reactions where supported; see /tools/reactions)--participant, --from-me--target-author or --target-author-uuid requiredreactions
--message-id, --target--limitread
--target--limit, --message-id, --before, --after--message-id reads a specific Slack message timestamp; combine with --thread-id to read an exact thread reply.--aroundedit
--message-id, --message, --targetdelete
--message-id, --targetpin / unpin
--message-id, --targetpins (list)
--targetpermissions
--targetsearch
--guild-id, --query--channel-id, --channel-ids (repeat), --author-id, --author-ids (repeat), --limitthread create
--thread-name, --target (channel id)--message-id, --message, --auto-archive-minthread list
--guild-id--channel-id, --include-archived, --before, --limitthread reply
--target (thread id), --message--media, --reply-toemoji list
--guild-idemoji upload
--guild-id, --emoji-name, --media--role-ids (repeat)sticker send
--target, --sticker-id (repeat)--messagesticker upload
--guild-id, --sticker-name, --sticker-desc, --sticker-tags, --mediarole info (Discord): --guild-idrole add / role remove (Discord): --guild-id, --user-id, --role-idchannel info (Discord): --targetchannel list (Discord): --guild-idmember info (Discord/Slack): --user-id (+ --guild-id for Discord)voice status (Discord): --guild-id, --user-idevent list (Discord): --guild-idevent create (Discord): --guild-id, --event-name, --start-time
--end-time, --desc, --channel-id, --location, --event-typetimeout: --guild-id, --user-id (optional --duration-min or --until; omit both to clear timeout)kick: --guild-id, --user-id (+ --reason)ban: --guild-id, --user-id (+ --delete-days, --reason)
timeout also supports --reasonbroadcast
--channel all to target all providers--targets <target...>--message, --media, --dry-runSend a Discord reply:
openclaw message send --channel discord \
--target channel:123 --message "hi" --reply-to 456
Send a message with semantic buttons:
openclaw message send --channel discord \
--target channel:123 --message "Choose:" \
--presentation '{"blocks":[{"type":"buttons","buttons":[{"label":"Approve","value":"approve","style":"success"},{"label":"Decline","value":"decline","style":"danger"}]}]}'
Core renders the same presentation payload into Discord components, Slack blocks, Telegram inline buttons, Mattermost props, or Teams/Feishu cards depending on channel capability. See Message Presentation for the full contract and fallback rules.
Send a richer presentation payload:
openclaw message send --channel googlechat --target spaces/AAA... \
--message "Choose:" \
--presentation '{"title":"Deploy approval","tone":"warning","blocks":[{"type":"text","text":"Choose a path"},{"type":"buttons","buttons":[{"label":"Approve","value":"approve"},{"label":"Decline","value":"decline"}]}]}'
Create a Discord poll:
openclaw message poll --channel discord \
--target channel:123 \
--poll-question "Snack?" \
--poll-option Pizza --poll-option Sushi \
--poll-multi --poll-duration-hours 48
Create a Telegram poll (auto-close in 2 minutes):
openclaw message poll --channel telegram \
--target @mychat \
--poll-question "Lunch?" \
--poll-option Pizza --poll-option Sushi \
--poll-duration-seconds 120 --silent
Send a Teams proactive message:
openclaw message send --channel msteams \
--target conversation:19:[email protected] --message "hi"
Create a Teams poll:
openclaw message poll --channel msteams \
--target conversation:19:[email protected] \
--poll-question "Lunch?" \
--poll-option Pizza --poll-option Sushi
React in Slack:
openclaw message react --channel slack \
--target C123 --message-id 456 --emoji "✅"
React in a Signal group:
openclaw message react --channel signal \
--target signal:group:abc123 --message-id 1737630212345 \
--emoji "✅" --target-author-uuid 123e4567-e89b-12d3-a456-426614174000
Send Telegram inline buttons through generic presentation:
openclaw message send --channel telegram --target @mychat --message "Choose:" \
--presentation '{"blocks":[{"type":"buttons","buttons":[{"label":"Yes","value":"cmd:yes"},{"label":"No","value":"cmd:no"}]}]}'
Send a Teams card through generic presentation:
openclaw message send --channel msteams \
--target conversation:19:[email protected] \
--presentation '{"title":"Status update","blocks":[{"type":"text","text":"Build completed"}]}'
Send a Telegram image as a document to avoid compression:
openclaw message send --channel telegram --target @mychat \
--media ./diagram.png --force-document