messages.getPinnedDialogs

Get pinned dialogs

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.getPinnedDialogs({
        folderId: 2463643,
        }));
    console.log(result); // prints the result
})();

TL schema

messages.peerDialogs#3371c354 dialogs:Vector<Dialog> messages:Vector<Message> chats:Vector<Chat> users:Vector<User> state:updates.State = messages.PeerDialogs;
---functions---
messages.getPinnedDialogs#d6b94df2 folder_id:int = messages.PeerDialogs;

Parameters

Result

messages.PeerDialogs

Possible errors

Code

Type

Description

400

FOLDER_ID_INVALID

Invalid folder ID

Can bots use this methd ?

yes

Telegram allows placing chats into folders, based on their type, mute status, or other custom criteria, thanks to folder blacklists and whitelists.

Last updated