messages.getUnreadMentions

Get unread messages where we were mentioned

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.getUnreadMentions({
        peer: new Api.InputPeer({...}),
        offsetId: 2543174,
        addOffset: 4403363,
        limit: 3577797,
        maxId: 9456904,
        minId: 282118,
        }));
    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.getUnreadMentions#46578472 peer:InputPeer offset_id:int add_offset:int limit:int max_id:int min_id:int = messages.Messages;

Parameters

Result

messages.Messages

Possible errors

Can bots use this methd ?

yes

How to fetch results from large lists of objects.

Last updated