updates.getState

Returns a current state of updates.

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.updates.getState({
        }));
    console.log(result); // prints the result
})();

TL schema

updates.state#a56c2a3e pts:int qts:int date:int seq:int unread_count:int = updates.State;
---functions---
updates.getState#edd4882a = updates.State;

Parameters

Name

Type

Description

Result

updates.State

Possible errors

Code

Type

Description

Can bots use this methd ?

yes

Last updated