messages.getPeerDialogs
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.getPeerDialogs({
peers: [new Api.InputDialogPeer({...})],
}));
console.log(result); // prints the result
})();import {Api, TelegramClient} from 'telegram';
import {StringSession} from 'telegram/sessions';
const session = new StringSession('');
const client = new TelegramClient(session, apiId, apiHash, {});
(async function run() {
const result: Api.messages.PeerDialogs = await client.invoke(new Api.messages.getPeerDialogs({
peers: [new Api.InputDialogPeer({...})],
}));
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.getPeerDialogs#e470bcfd peers:Vector<InputDialogPeer> = messages.PeerDialogs;Parameters
Result
Possible errors
Can bots use this methd ?
yes
Related pages
Last updated