Link Search Menu Expand Document

Method: channels.updatePinnedForumTopic

Back to methods index

Pin or unpin forum topics

Parameters:

NameTypeDescriptionRequired
channelUsername, chat ID, Update, Message or InputChannelSupergroup IDOptional
topic_idintForum topic IDOptional
pinnedBoolWhether to pin or unpin the topicYes

Return type: Updates

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();

$Updates = $MadelineProto->channels->updatePinnedForumTopic(channel: $InputChannel, topic_id: $int, pinned: $Bool, );