Method: channels.createForumTopic
Create a forum topic; requires manage_topics
rights.
Parameters:
Name | Type | Description | Required |
---|---|---|---|
channel | Username, chat ID, Update, Message or InputChannel | The forum | Optional |
title | string | Topic title (maximum UTF-8 length: 128) | Optional |
icon_color | int | If no custom emoji icon is specified, specifies the color of the fallback topic icon (RGB), one of 0x6FB9F0 , 0xFFD67E , 0xCB86DB , 0x8EEE98 , 0xFF93B2 , or 0xFB6F5F . | Optional |
icon_emoji_id | long | ID of 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. | Optional |
send_as | Username, chat ID, Update, Message or InputPeer | Create the topic as the specified peer | 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->createForumTopic(channel: $InputChannel, title: 'string', icon_color: $int, icon_emoji_id: $long, send_as: $InputPeer, );