2024-06-05 12:19:46 +02:00
|
|
|
---
|
|
|
|
sidebar_position: 5
|
|
|
|
---
|
|
|
|
|
|
|
|
# Open forum thread
|
|
|
|
Reopens a previously closed forum thread
|
|
|
|
|
|
|
|
|
2024-06-07 08:47:43 +02:00
|
|
|
*Function OpenForumThread(Val Token, Val ChatID, Val ThreadID = "") Export*
|
2024-06-05 12:19:46 +02:00
|
|
|
|
|
|
|
| Parameter | CLI option | Type | Destination |
|
|
|
|
|-|-|-|-|
|
|
|
|
| Token | --token | String | Token |
|
|
|
|
| ChatID | --forum | String, Number | Thread chat ID |
|
|
|
|
| ThreadID | --topic | String, Number | Thread ID |
|
|
|
|
|
|
|
|
|
2024-06-06 14:33:52 +02:00
|
|
|
Returns: Map Of KeyAndValue - Serialized JSON response from Telegram
|
2024-06-05 12:19:46 +02:00
|
|
|
|
|
|
|
```bsl title="Code example"
|
|
|
|
|
|
|
|
Token = "6129457865:AAFyzNYOAFbu...";
|
|
|
|
Chat = "-1001971186208";
|
|
|
|
Topic = "2673";
|
2024-06-05 12:35:05 +02:00
|
|
|
|
2024-06-05 12:19:46 +02:00
|
|
|
Result = OPI_Telegram.OpenForumThread(Token, Chat); // Opens main topic
|
|
|
|
Result = OPI_Telegram.OpenForumThread(Token, Chat, Topic);
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
```sh title="CLI command example"
|
|
|
|
|
|
|
|
oint telegram OpenForumThread --token "6129457865:AAFyzNYOAFbu..." --forum %forum% --topic %topic%
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
```json title="Result"
|
|
|
|
|
|
|
|
{
|
|
|
|
"ok": true,
|
|
|
|
"result": true
|
|
|
|
}
|
|
|
|
|
|
|
|
```
|