1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-04-11 11:41:56 +02:00
Vitaly the Alpaca (bot) c12aa84c7a Main build (Jenkins)
2025-01-10 12:07:46 +03:00

72 lines
1.5 KiB
Plaintext
Vendored

---
sidebar_position: 4
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Close forum thread
Closes the thread for new messages
`Function CloseForumThread(Val Token, Val ChatID, Val ThreadID = "") Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Token | --token | String | ✔ | Token |
| ChatID | --forum | String, Number | ✔ | Thread chat ID |
| ThreadID | --topic | String, Number | ✖ | Thread ID |
Returns: Map Of KeyAndValue - serialized JSON response from Telegram
<br/>
:::tip
Method at API documentation: [closeForumTopic](https://core.telegram.org/bots/api#closeforumtopic)
:::
<br/>
```bsl title="1C:Enterprise/OneScript code example"
Token = "6129457865:AAFyzNYOAFbu...";
Chat = "-1001971186208";
Topic = "3896";
Result = OPI_Telegram.CloseForumThread(Token, Chat); // Closes main topic
Result = OPI_Telegram.CloseForumThread(Token, Chat, Topic);
```
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint telegram CloseForumThread \
--token "***" \
--forum "-1001971186208" \
--topic "7784"
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint telegram CloseForumThread ^
--token "***" ^
--forum "-1001971186208" ^
--topic "7784"
```
</TabItem>
</Tabs>
```json title="Result"
{
"ok": true,
"result": true
}
```