1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2024-12-16 11:38:11 +02:00
OpenIntegrations/docs/en/md/Telegram/Administration/Delete-message.md
2024-07-10 14:24:11 +03:00

50 lines
916 B
Markdown

---
sidebar_position: 7
---
# Delete message
Delete message from chat or channel
<br/>
`Function DeleteMessage(Val Token, Val ChatID, Val MessageID) Export`
| Parameter | CLI option | Type | Destination |
|-|-|-|-|
| Token | --token | String | Token |
| ChatID | --chat | String, Number | Target chat ID |
| MessageID | --message | String, Number | ID of message to delete |
Returns: Map Of KeyAndValue - Serialized JSON response from Telegram
<br/>
```bsl title="Code example"
Token = "6129457865:AAFyzNYOAFbu...";
ChatID = "@testsichee";
MessageID = "5385";
Result = OPI_Telegram.DeleteMessage(Token, ChatID, MessageID);
```
```sh title="CLI command example"
oint telegram DeleteMessage --token "6129457865:AAFyzNYOAFbu..." --chat "@testsichee" --message "5385"
```
```json title="Result"
{
"ok": true,
"result": true
}
```