Skip to content

Latest commit

 

History

History
565 lines (373 loc) · 16.6 KB

File metadata and controls

565 lines (373 loc) · 16.6 KB

tlgr reaction

17 operations. Every one takes the global flags (--json, --plain, -a/--account, --results-only, --select, --dry-run, --yes, --no-input, --flood-wait-max, -v) anywhere on the line.

Command Summary
reaction add React to a message with one or more unicode or custom emoji
reaction catalog The reaction catalogue: standard, featured, or my recently used
reaction chat get Which reactions a chat (or one message) allows
reaction chat set Restrict which reactions a chat allows, cap them, enable Star reactions
reaction default get Show the quick (double-tap) reaction
reaction default set Set the quick (double-tap) reaction
reaction list Reaction counts on one or many messages
reaction pay Send a Star (paid) reaction to a channel post
reaction privacy get Default privacy of my paid reactions
reaction privacy set Change the privacy of paid reactions, including ones already sent
reaction purge Delete a member's reactions on one message or across a chat
reaction remove Remove one of my reactions, or all of them
reaction report Report a reaction, optionally blocking the member who left it
reaction tag list Saved Messages reaction tags (and the suggested ones)
reaction tag set Name or rename a Saved Messages tag
reaction unread list Unread reactions in a chat, and optionally mark them read
reaction user list Who reacted to a message, per emoji

reaction add

React to a message with one or more unicode or custom emoji.

sendReaction carries the whole desired state, so tlgr reads the reactions this account already has and resends them alongside the new one; --replace sends exactly what was asked for instead. Reacting twice is already: true, not an error.

tlgr reaction add <CHAT> <MSG_ID> [EMOJI]... [OPTIONS]

mutating · idempotent (reports already) · returns ReactionResult

Argument Type Required Meaning
CHAT chat yes Chat.
MSG_ID msg-id yes Message id or link.
EMOJI text one or more Reactions; omit to clear them all.
Flag Type Default Meaning
--big flag Play the big animation.
--custom int Custom (Premium) emoji id; repeatable.
--recent flag Remember it as recently used.
--replace flag Send exactly this set instead of adding to mine.
--send-as chat Paid reactions only.

Also invocable as: tlgr msg react, tlgr react add, tlgr message react

$ tlgr reaction add @alice 12345 👍 --json
Catalog coverage (9 full, 0 partial)

Full: emoji.interaction, messages-core.reaction-add-remove, messages-core.saved-tags-add, reaction.add-to-recent, reaction.big, reaction.send-custom-emoji, reaction.send-emoji, reaction.send-multiple, reaction.service-messages

emoji.interaction (the hearts-and-fireworks tap animation) is the same gesture from a CLI's point of view: tlgr sends the reaction and does not replay the per-tap animation payload.

reaction catalog

The reaction catalogue: standard, featured, or my recently used.

Three endpoints, one row shape; source says which list a row came from. --forget clears the recently-used list first.

tlgr reaction catalog [OPTIONS]

paginated (LOCAL cursor) · returns Page[AvailableReaction]

Flag Type Default Meaning
--forget flag Clear the recently-used list.
--recent flag My recently used reactions.
--refresh flag Ignore the cached hash.
--top flag Featured / top reactions.

Pagination is transport-level: --limit/-n, --cursor TOKEN, --all (walked inside the daemon, paced by the account's own rate limiter).

Also invocable as: tlgr react catalog

$ tlgr reaction catalog --json
Catalog coverage (4 full, 0 partial)

Full: reaction.available-list, reaction.clear-recent, reaction.recent-list, reaction.top-featured

reaction chat get

Which reactions a chat (or one message) allows.

chatFull/channelFull.available_reactions is the source of truth. With --msg-id an all policy is expanded against the live catalogue, which is the set that would actually be accepted.

tlgr reaction chat get <CHAT> [OPTIONS]

returns ChatReactions

Argument Type Required Meaning
CHAT chat yes Chat.
Flag Type Default Meaning
--msg-id msg-id Narrow to one message.

Also invocable as: tlgr reaction available

$ tlgr reaction chat get @news --json
Catalog coverage (2 full, 0 partial)

Full: reaction.chat-available-get, reaction.message-available

reaction chat set

Restrict which reactions a chat allows, cap them, enable Star reactions.

Needs the change_info admin right. Because the wire field is mandatory, tlgr reads the current policy first and resends it unchanged when only the cap or the Star switch was asked for.

tlgr reaction chat set <CHAT> [OPTIONS]

mutating · returns ChatReactions

Argument Type Required Meaning
CHAT chat yes Chat.
Flag Type Default Meaning
--allow-custom flag Allow custom-emoji reactions.
--every flag Allow every reaction.
--max-unique int Cap unique reactions per message.
--none flag Disable reactions.
--paid on off
--some text Allow exactly this set.
$ tlgr reaction chat set @news --some 👍,❤ --json
Catalog coverage (3 full, 0 partial)

Full: reaction.chat-available-set, reaction.chat-unique-limit, reaction.paid-enable

reaction default get

Show the quick (double-tap) reaction.

Read from help.getConfig().reactions_default; there is no dedicated getter.

tlgr reaction default get [OPTIONS]

returns ReactionTag

$ tlgr reaction default get --json

reaction default set

Set the quick (double-tap) reaction.

tlgr reaction default set [EMOJI] [OPTIONS]

mutating · idempotent (reports already) · returns ReactionTag

Argument Type Required Meaning
EMOJI text no The reaction to make default.
Flag Type Default Meaning
--custom int Use a custom emoji (Premium).
$ tlgr reaction default set ❤ --json
Catalog coverage (1 full, 0 partial)

Full: reaction.quick-default

reaction list

Reaction counts on one or many messages.

--top-senders adds the Star-reaction leaderboard, which only messages.getMessagesReactions returns — it is not on the message.

tlgr reaction list <CHAT> [MSG_ID]... [OPTIONS]

returns Page[MessageReactionState]

Argument Type Required Meaning
CHAT chat yes Chat.
MSG_ID text one or more One or more message ids.
Flag Type Default Meaning
--top-senders flag Include the Star-reaction leaderboard.

Also invocable as: tlgr react list

$ tlgr reaction list @alice 12345 --json
Catalog coverage (5 full, 0 partial)

Full: messages-core.reactions-count, reaction.bulk-refresh, reaction.paid-leaderboard, reaction.read-summary, stories.available-reactions

stories.available-reactions is the same catalogue this group publishes as reaction catalog; the story surface itself is PR-8's.

reaction pay

Send a Star (paid) reaction to a channel post.

Spends real Stars. --stars is mandatory, there is no default amount, and a failed payment is never retried automatically. --senders lists the identities you could pay as without paying.

tlgr reaction pay <CHAT> <MSG_ID> [OPTIONS]

mutating · destructive (needs --yes off a TTY) · returns PaidReactionResult

Argument Type Required Meaning
CHAT chat yes Channel.
MSG_ID msg-id yes Post id.
Flag Type Default Meaning
--anonymous flag Hide my name on the leaderboard.
--send-as chat Pay as my channel.
--senders flag List the peers I may pay as, instead of paying.
--stars int How many Stars to send.
$ tlgr reaction pay @news 12345 --stars 50 --json
Catalog coverage (4 full, 0 partial)

Full: messages-core.reaction-paid-star, reaction.live-story-paid, reaction.paid-send, reaction.paid-send-as

reaction.live-story-paid is the same Star spend inside a live story; the live-story stream itself is control-only for a CLI and belongs to the calls group.

reaction privacy get

Default privacy of my paid reactions.

tlgr reaction privacy get [OPTIONS]

returns ReactionPrivacy

$ tlgr reaction privacy get --json
Catalog coverage (1 full, 0 partial)

Full: reaction.paid-privacy-get

reaction privacy set

Change the privacy of paid reactions, including ones already sent.

Also changes the account-wide default, which is what the server does.

tlgr reaction privacy set <MODE> [OPTIONS]

mutating · idempotent (reports already) · returns ReactionPrivacy

Argument Type Required Meaning
MODE text yes default
Flag Type Default Meaning
--chat chat The post's chat.
--msg-id msg-id The post itself.
--send-as chat Attribute them to this channel.
$ tlgr reaction privacy set anonymous --chat @news --msg-id 12345 --json
Catalog coverage (1 full, 0 partial)

Full: reaction.paid-privacy-set

reaction purge

Delete a member's reactions on one message or across a chat.

Moderation: needs delete_messages or ban rights in the chat.

tlgr reaction purge <CHAT> <USER> [OPTIONS]

mutating · destructive (needs --yes off a TTY) · returns ReactionPurge

Argument Type Required Meaning
CHAT chat yes Chat.
USER user yes Whose reactions.
Flag Type Default Meaning
--every flag Every reaction this member left in the chat.
--msg msg-id Only this message.

Also invocable as: tlgr react purge

$ tlgr reaction purge @news @alice --msg 12345 --json
Catalog coverage (2 full, 0 partial)

Full: messages-core.reaction-delete-from-sender, reaction.purge-participant-message

reaction remove

Remove one of my reactions, or all of them.

Naming no reaction removes all of mine. A reaction that was not there is already: true, so a retry is safe.

tlgr reaction remove <CHAT> <MSG_ID> [EMOJI] [OPTIONS]

mutating · idempotent (reports already) · returns ReactionResult

Argument Type Required Meaning
CHAT chat yes Chat.
MSG_ID msg-id yes Message id or link.
EMOJI text no Which one; omit for all of mine.
Flag Type Default Meaning
--custom int Remove this custom-emoji reaction.
--every flag Remove every reaction of mine.

Also invocable as: tlgr message unreact, tlgr react remove

$ tlgr reaction remove @alice 12345 👍 --json
Catalog coverage (1 full, 0 partial)

Full: reaction.remove

reaction report

Report a reaction, optionally blocking the member who left it.

Only valid on your own posts. Reporting cannot be undone from a client.

tlgr reaction report <CHAT> <MSG_ID> <USER> [OPTIONS]

mutating · returns ReactionReport

Argument Type Required Meaning
CHAT chat yes Chat.
MSG_ID msg-id yes The post.
USER user yes Who reacted.
Flag Type Default Meaning
--ban flag Also block them from replying.
$ tlgr reaction report @news 12345 @alice --json
Catalog coverage (3 full, 0 partial)

Full: groups-channels-admin.report-reaction, reaction.ban-sender, reaction.report

reaction tag list

Saved Messages reaction tags (and the suggested ones).

Premium. Tagging a saved message is reacting to it — tlgr reaction add me <id> 📌 — and this is where the tags are named.

tlgr reaction tag list [OPTIONS]

mutating · returns Page[ReactionTag]

Flag Type Default Meaning
--clear-title text Drop a tag's name.
--peer chat Tags used inside one saved dialog.
--refresh flag Ignore the cached hash.
--rename text Name or rename a tag.
--suggested flag Default/suggested tag reactions.
$ tlgr reaction tag list --json
Catalog coverage (4 full, 0 partial)

Full: dialogs.saved-tags, messages-core.saved-tags-manage, reaction.default-tag-reactions, reaction.saved-tags-list

reaction tag set

Name or rename a Saved Messages tag.

Premium. Omitting the title, or passing --clear, removes the name.

tlgr reaction tag set <EMOJI> [TITLE] [OPTIONS]

mutating · idempotent (reports already) · returns ReactionTag

Argument Type Required Meaning
EMOJI text yes The tag reaction.
TITLE text no The name to give it.
Flag Type Default Meaning
--clear flag Remove the name.
--custom int A custom-emoji tag.
$ tlgr reaction tag set 📌 invoices --json
Catalog coverage (1 full, 0 partial)

Full: reaction.saved-tag-rename

reaction unread list

Unread reactions in a chat, and optionally mark them read.

--read-all drives messages.readReactions until its offset comes back zero; calling it once clears only the first page of the badge.

tlgr reaction unread list <CHAT> [OPTIONS]

paginated (PARTICIPANTS cursor) · returns Page[Message]

Argument Type Required Meaning
CHAT chat yes Chat.
Flag Type Default Meaning
--direct-to user Only this monoforum topic.
--read-all flag Mark every unread reaction as read.
--topic msg-id Only this forum topic.

Pagination is transport-level: --limit/-n, --cursor TOKEN, --all (walked inside the daemon, paced by the account's own rate limiter).

$ tlgr reaction unread list @alice --json
Catalog coverage (1 full, 0 partial)

Full: reaction.read-all

reaction user list

Who reacted to a message, per emoji.

Only where can_see_list is set — groups, and small channels.

tlgr reaction user list <CHAT> <MSG_ID> [OPTIONS]

paginated (PARTICIPANTS cursor) · returns Page[ReactionUser]

Argument Type Required Meaning
CHAT chat yes Chat.
MSG_ID msg-id yes Message id.
Flag Type Default Meaning
--custom int Only this custom-emoji reaction.
--emoji text Only this reaction.

Pagination is transport-level: --limit/-n, --cursor TOKEN, --all (walked inside the daemon, paced by the account's own rate limiter).

Also invocable as: tlgr react who, tlgr reaction users

$ tlgr reaction user list @alice 12345 --json
Catalog coverage (1 full, 0 partial)

Full: reaction.who-reacted