Skip to main content

Create forum thread

Creates a new thread in the group with theme functionality enabled

Function CreateForumThread(Val Token, Val ChatID, Val Title, Val IconID = "") Export

ParameterCLI optionTypeDescription
Token--tokenStringToken
ChatID--forumString, NumberThread creation chat ID
Title--titleStringThread title
IconID--iconStringSee GetAvatarIconList

Returns: Map Of KeyAndValue - Serialized JSON response from Telegram


Code example
  Token = "6129457865:AAFyzNYOAFbu...";
Chat = "-1001971186208";
Icon = "5357419403325481346";
Name = "TestTopic " + String(New UUID);

Result = OPI_Telegram.CreateForumThread(Token, Chat, Name, Icon);
CLI command example
    
oint telegram CreateForumThread --token "6129457865:AAFyzNYOAFbu..." --forum %forum% --title %title% --icon %icon%

Result
{
"ok": true,
"result": {
"message_thread_id": 2457,
"name": "TestTopic bb6937b8-0372-4118-81f5-cb75b85c4627",
"icon_color": 7322096,
"icon_custom_emoji_id": "5357419403325481346"
}
}