Link Search Menu Expand Document

Method: channels.toggleForum

Back to methods index

Enable or disable forum functionality in a supergroup.


channelUsername, chat ID, Update, Message or InputChannelSupergroup IDOptional
enabledBoolEnable or disable forum functionalityYes

Return type: Updates

Can bots use this method: YES

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

if (!file_exists('madeline.php')) {
    copy('', 'madeline.php');
include 'madeline.php';

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

$Updates = $MadelineProto->channels->toggleForum(channel: $InputChannel, enabled: $Bool, );