1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-12-15 23:41:44 +02:00
Files
OpenIntegrations/docs/en/md/Telegram/Forum-topic-management/Create-forum-thread.mdx
Vitaly the Alpaca (bot) afc37794d5 Main build (Jenkins)
2024-10-15 10:50:56 +03:00

56 lines
1.2 KiB
Plaintext

---
sidebar_position: 2
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# 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`
| Parameter | CLI option | Type | Description |
|-|-|-|-|
| Token | --token | String | Token |
| ChatID | --forum | String, Number | Thread creation chat ID |
| Title | --title | String | Thread title |
| IconID | --icon | String | See GetAvatarIconList |
Returns: Map Of KeyAndValue - serialized JSON response from Telegram
<br/>
:::tip
Method at API documentation: [createForumTopic](https://core.telegram.org/bots/api#createforumtopic)
:::
<br/>
```bsl title="Code example"
Token = "6129457865:AAFyzNYOAFbu...";
Chat = "-1001971186208";
Icon = "5357419403325481346";
Name = "TestTopic " + String(New UUID);
Result = OPI_Telegram.CreateForumThread(Token, Chat, Name, Icon);
```
```json title="Result"
{
"ok": true,
"result": {
"message_thread_id": 5407,
"name": "TestTopic 6e8a9d01-e4f4-4c9e-80fc-004f9bd0d697",
"icon_color": 7322096,
"icon_custom_emoji_id": "5357419403325481346"
}
}
```