channels.getGroupsForDiscussion

Get all groups that can be used as discussion groups.

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.channels.getGroupsForDiscussion({
        }));
    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---
channels.getGroupsForDiscussion#f5dad378 = messages.Chats;

Parameters

Name

Type

Description

Result

messages.Chats

Possible errors

Code

Type

Description

Can bots use this methd ?

yes

Groups can be associated to a channel as a discussion group, to allow users to discuss about posts.

How to handle channels, supergroups, groups, and what's the difference between them.

Hide/unhide message history for new channel/supergroup users

Last updated