messages.getPeerDialogs
Get dialog info of specified 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.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
Name
Type
Description
Result
Possible errors
Code
Type
Description
400
CHANNEL_INVALID
The provided channel is invalid
400
CHANNEL_PRIVATE
You haven't joined this channel/supergroup
400
CONNECTION_DEVICE_MODEL_EMPTY
Device model empty
400
MSG_ID_INVALID
Invalid message ID provided
400
PEER_ID_INVALID
The provided peer id is invalid
Can bots use this methd ?
yes
Related pages
Last updated
Was this helpful?