messages.getAllChats
Get all chats, channels and supergroups
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.getAllChats({
exceptIds: [7475723],
}));
console.log(result); // prints the result
})();
TL schema
messages.chats#64ff9fd5 chats:Vector<Chat> = messages.Chats;
messages.chatsSlice#9cd81144 count:int chats:Vector<Chat> = messages.Chats;
---functions---
messages.getAllChats#eba80ff0 except_ids:Vector<int> = messages.Chats;
Parameters
Result
Possible errors
Code
Type
Description
Can bots use this methd ?
yes
Related pages
Last updated
Was this helpful?