contacts.toggleTopPeers
Enable/disable top peers
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.contacts.toggleTopPeers({
enabled: new Api.Bool({...}),
}));
console.log(result); // prints the result
})();
TL schema
boolFalse#bc799737 = Bool;
boolTrue#997275b5 = Bool;
---functions---
contacts.toggleTopPeers#8514bdda enabled:Bool = Bool;
Parameters
Name
Type
Description
Result
Possible errors
Code
Type
Description
Can bots use this methd ?
yes
Related pages
If enabled, the rating of top peers indicates the relevance of a frequently used peer in a certain category (frequently messaged users, frequently used bots, inline bots, frequently visited channels and so on).
Last updated
Was this helpful?