mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-03-25 21:39:21 +02:00
79 lines
1.9 KiB
Plaintext
79 lines
1.9 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 | Required | 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="1C:Enterprise/OneScript code example"
|
|
Token = "6129457865:AAFyzNYOAFbu...";
|
|
Chat = "-1001971186208";
|
|
Icon = "5357419403325481346";
|
|
Name = "TestTopic " + String(New UUID);
|
|
|
|
Result = OPI_Telegram.CreateForumThread(Token, Chat, Name, Icon);
|
|
```
|
|
|
|
|
|
<Tabs>
|
|
|
|
<TabItem value="bash" label="Bash" default>
|
|
```bash
|
|
oint telegram CreateForumThread \
|
|
--token "***" \
|
|
--forum "-1001971186208" \
|
|
--icon "5357419403325481346" \
|
|
--title "TestTopic e5b5a796-e294-48e8-973a-4a31bc3348c2"
|
|
```
|
|
</TabItem>
|
|
|
|
<TabItem value="bat" label="CMD/Bat" default>
|
|
```batch
|
|
oint telegram CreateForumThread ^
|
|
--token "***" ^
|
|
--forum "-1001971186208" ^
|
|
--icon "5357419403325481346" ^
|
|
--title "TestTopic e5b5a796-e294-48e8-973a-4a31bc3348c2"
|
|
```
|
|
</TabItem>
|
|
</Tabs>
|
|
|
|
|
|
```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"
|
|
}
|
|
}
|
|
```
|