help.getNearestDc

Returns info on data centre nearest to the user.

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

TL schema

nearestDc#8e1a1775 country:string this_dc:int nearest_dc:int = NearestDc;
---functions---
help.getNearestDc#1fb33026 = NearestDc;

Parameters

Name

Type

Description

Result

NearestDc

Possible errors

Code

Type

Description

Can bots use this methd ?

yes

Last updated