messages.getReplies

Get messages in a reply thread

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.getReplies({
        peer: new Api.InputPeer({...}),
        msgId: 7855235,
        offsetId: 9695761,
        offsetDate: 8619023,
        addOffset: 4679718,
        limit: 2057604,
        maxId: 3135654,
        minId: 6971168,
        hash: 5441484,
        }));
    console.log(result); // prints the result
})();

TL schema

messages.messages#8c718e87 messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = messages.Messages;
messages.messagesSlice#3a54685e flags:# inexact:flags.1?true count:int next_rate:flags.0?int offset_id_offset:flags.2?int messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = messages.Messages;
messages.channelMessages#64479808 flags:# inexact:flags.1?true pts:int count:int offset_id_offset:flags.2?int messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = messages.Messages;
messages.messagesNotModified#74535f21 count:int = messages.Messages;
---functions---
messages.getReplies#24b581ba peer:InputPeer msg_id:int offset_id:int offset_date:int add_offset:int limit:int max_id:int min_id:int hash:int = messages.Messages;

Parameters

Name

Type

Description

peer

Peer

msg_id

Message ID

limit

Maximum number of results to return, see pagination

max_id

If a positive value was transferred, the method will return only messages with ID smaller than max_id

min_id

If a positive value was transferred, the method will return only messages with ID bigger than min_id

Result

messages.Messages

Possible errors

Code

Type

Description

Can bots use this methd ?

yes

How to fetch results from large lists of objects.

Last updated