1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2024-12-29 02:57:35 +02:00
OpenIntegrations/docs/en/md/Telegram/Administration/Delete-message.md

48 lines
907 B
Markdown
Raw Normal View History

---
sidebar_position: 7
---
# Delete message
Delete message from chat or channel
2024-07-10 12:58:29 +02:00
`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
2024-07-10 13:05:58 +02:00
<br/>
2024-07-10 12:58:29 +02:00
```bsl title="Code example"
2024-07-10 13:24:11 +02:00
Token = "6129457865:AAFyzNYOAFbu...";
ChatID = "@testsichee";
2024-08-09 16:15:52 +02:00
MessageID = "6846";
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"
2024-07-10 13:11:17 +02:00
{
"ok": true,
"result": true
}
```