messages.sendReaction

Send reaction to message

Example

const {Api, TelegramClient} = require('telegram');
const {StringSession} = require('telegram/sessions');

const session = new StringSession('');
const client = new TelegramClient(session, apiId, apiHash, {});

(async function run() {
    const result = await client.invoke(new Api.messages.sendReaction({
        peer: new Api.InputPeer({...}),
        msgId: 4607905,
        reaction: 'random string here',
        }));
    console.log(result); // prints the result
})();

TL schema

Method schema is available as of layer 129. Switch »

Parameters

Name

Type

Description

flags

peer

Peer

msg_id

Message ID to react to

reaction

Reaction (a UTF8 emoji)

Result

Updates

Possible errors

Code

Type

Description

400

MESSAGE_ID_INVALID

The provided message id is invalid

400

REACTION_EMPTY

Empty reaction provided

Can bots use this methd ?

yes

Last updated