2024-08-13 12:24:12 +02:00
|
|
|
---
|
|
|
|
sidebar_position: 5
|
|
|
|
---
|
|
|
|
|
|
|
|
# Delete message
|
|
|
|
Deletes a message by ID
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
`Function DeleteMessage(Val Token, Val ChatID, Val MessageID) Export`
|
|
|
|
|
2024-08-13 14:52:26 +02:00
|
|
|
| Parameter | CLI option | Type | Description |
|
|
|
|
|-|-|-|-|
|
|
|
|
| Token | --token | String | Bot token |
|
|
|
|
| ChatID | --chatid | String, Number | Chat ID for message sending |
|
|
|
|
| MessageID | --messageid | String, Number | Message ID for editing |
|
2024-08-13 12:24:12 +02:00
|
|
|
|
2024-08-13 14:52:26 +02:00
|
|
|
|
|
|
|
Returns: Map Of KeyAndValue - Serialized JSON response from VK Teams
|
2024-08-13 12:24:12 +02:00
|
|
|
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
:::tip
|
|
|
|
Method at API documentation: [GET /messages/deleteMessages](https://teams.vk.com/botapi/#/messages/get_messages_deleteMessages)
|
|
|
|
:::
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
|
|
|
|
```bsl title="Code example"
|
2024-08-13 15:47:32 +02:00
|
|
|
Token = "001.3501506236.091...";
|
|
|
|
ChatID = "689203963@chat.agent";
|
2024-08-18 16:47:59 +02:00
|
|
|
MessageID = "7401463509940174907";
|
2024-08-13 15:47:32 +02:00
|
|
|
|
|
|
|
Result = OPI_VKTeams.DeleteMessage(Token, ChatID, MessageID);
|
2024-08-13 12:24:12 +02:00
|
|
|
```
|
2024-08-13 14:52:26 +02:00
|
|
|
|
2024-08-13 12:24:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
```sh title="CLI command example"
|
2024-08-13 14:52:26 +02:00
|
|
|
|
|
|
|
oint vkteams DeleteMessage --token "001.3501506236.091..." --chatid "689203963@chat.agent" --messageid "7402287649739767956"
|
2024-08-13 12:24:12 +02:00
|
|
|
|
|
|
|
```
|
|
|
|
|
2024-08-13 14:52:26 +02:00
|
|
|
```json title="Result"
|
2024-08-13 12:24:12 +02:00
|
|
|
|
2024-08-13 14:52:26 +02:00
|
|
|
```
|