Link Search Menu Expand Document

Method: channels.setDiscussionGroup

Back to methods index

Associate a group to a channel as discussion group for that channel

Parameters:

NameTypeDescriptionRequired
broadcastUsername, chat ID, Update, Message or InputChannelChannelOptional
groupUsername, chat ID, Update, Message or InputChannelDiscussion group to associate to the channelOptional

Return type: Bool

Can bots use this method: NO

MadelineProto Example (now async for huge speed and parallelism!):

if (!file_exists('madeline.php')) {
    copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
}
include 'madeline.php';

$MadelineProto = new \danog\MadelineProto\API('session.madeline');
$MadelineProto->start();

$Bool = $MadelineProto->channels->setDiscussionGroup(broadcast: $InputChannel, group: $InputChannel, );