1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-12-03 22:39:12 +02:00
Files
OpenIntegrations/docs/en/md/Telegram/Administration/Pin-message.mdx

49 lines
911 B
Plaintext
Raw Normal View History

2024-10-15 10:50:56 +03:00
---
2024-10-15 10:16:04 +03:00
sidebar_position: 4
---
2024-10-15 10:50:56 +03:00
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
2024-10-15 10:16:04 +03:00
# Pin message
Pins a message in the chat header
`Function PinMessage(Val Token, Val ChatID, Val MessageID) Export`
| Parameter | CLI option | Type | Description |
|-|-|-|-|
| Token | --token | String | Token |
| ChatID | --chat | String, Number | Target chat ID |
| MessageID | --message | String, Number | Target message ID |
Returns: Map Of KeyAndValue - serialized JSON response from Telegram
<br/>
:::tip
Method at API documentation: [pinChatMessage](https://core.telegram.org/bots/api#pinchatmessage)
:::
<br/>
```bsl title="Code example"
Token = "6129457865:AAFyzNYOAFbu...";
ChannelID = "@testsichee";
2024-10-15 12:00:35 +03:00
MessageID = "9807";
2024-10-15 10:16:04 +03:00
Result = OPI_Telegram.PinMessage(Token, ChannelID, MessageID);
```
```json title="Result"
{
"ok": true,
"result": true
}
```