messages.GetMessageReactionsList
Get message reaction list, along with the sender of each reaction.
Example
const { Api, TelegramClient } = require("telegram");
const { StringSession } = require("telegram/sessions");
const session = new StringSession(""); // You should put your string session here
const client = new TelegramClient(session, apiId, apiHash, {});
(async function run() {
await client.connect(); // This assumes you have already authenticated with .start()
const result = await client.invoke(
new Api.messages.GetMessageReactionsList({
peer: "username",
id: 43,
limit: 100,
reaction: "some string here",
offset: "some string here",
})
);
console.log(result); // prints the result
})();
import { Api, TelegramClient } from "telegram";
import { StringSession } from "telegram/sessions";
const session = new StringSession(""); // You should put your string session here
const client = new TelegramClient(session, apiId, apiHash, {});
(async function run() {
await client.connect(); // This assumes you have already authenticated with .start()
const result: Api.messages.MessageReactionsList = await client.invoke(
new Api.messages.GetMessageReactionsList({
peer: "username",
id: 43,
limit: 100,
reaction: "some string here",
offset: "some string here",
})
);
console.log(result); // prints the result
})();
Parameters
Name | Type | Description |
---|---|---|
flags | # | Flags, see TL conditional fields |
peer | InputPeer | Peer |
id | int | Message ID |
reaction | flags.0?string | Get only reactions of this type (UTF8 emoji) |
offset | flags.1?string | Offset (typically taken from the next_offset field of the returned messages.MessageReactionsList) |
limit | int | Maximum number of results to return, see pagination |
Result
Possible errors
Code | Type | Description |
---|
Can bots use this method?
No
Related pages
messages.MessageReactionsList
List of peers that reacted to a specific message
Pagination in the API
How to fetch results from large lists of objects.
Message reactions
Telegram allows users to react on any message using specific emojis, triggering cute lottie animations.