Link Search Menu Expand Document

Method: channels.reorderPinnedForumTopics

Back to methods index

Reorder pinned forum topics

Parameters:

NameTypeDescriptionRequired
forceBoolIf not set, the order of only the topics present both server-side and in order will be changed (i.e. mentioning topics not pinned server-side in order will not pin them, and not mentioning topics pinned server-side will not unpin them).
If set, the entire server-side pinned topic list will be replaced with order (i.e. mentioning topics not pinned server-side in order will pin them, and not mentioning topics pinned server-side will unpin them)
Optional
channelUsername, chat ID, Update, Message or InputChannelSupergroup IDOptional
orderArray of intTopic IDs »Yes

Return type: Updates

Can bots use this method: YES

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->reorderPinnedForumTopics(force: $Bool, channel: $InputChannel, order: [$int, $int], );