MadelineProtoDocs/docs/API_docs/methods/channels.editForumTopic.md
2024-05-01 14:53:46 +02:00

2.3 KiB

title description grand_parent parent image redirect_from
channels.editForumTopic Edit [forum topic](https://core.telegram.org/api/forum); requires [`manage_topics` rights](https://core.telegram.org/api/rights). Telegram RPC API Methods https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png /API_docs/methods/channels_editForumTopic.html

Method: channels.editForumTopic

Back to methods index

Edit forum topic; requires manage_topics rights.

Parameters:

Name Type Description Required
channel Username, chat ID, Update, Message or InputChannel Supergroup Optional
topic_id int Topic ID Optional
title string If present, will update the topic title (maximum UTF-8 length: 128). Optional
icon_emoji_id long If present, updates the custom emoji used as topic icon. Telegram Premium users can use any custom emoji, other users can only use the custom emojis contained in the inputStickerSetEmojiDefaultTopicIcons emoji pack. Pass 0 to switch to the fallback topic icon. Optional
closed Bool If present, will update the open/closed status of the topic. Optional
hidden Bool If present, will hide/unhide the topic (only valid for the "General" topic, id=1). Optional

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->editForumTopic(channel: $InputChannel, topic_id: $int, title: 'string', icon_emoji_id: $long, closed: $Bool, hidden: $Bool, );