You've already forked OpenIntegrations
mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-11-06 08:49:29 +02:00
Создание MD файлов документации
This commit is contained in:
committed by
Vitaly the Alpaca (bot)
parent
c57dee0dcd
commit
d604ba79a5
38
docs/en/md/VKTeams/Chat-management/Remove-chat-members.md
Normal file
38
docs/en/md/VKTeams/Chat-management/Remove-chat-members.md
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# Remove chat members
|
||||
Removes users from the chat
|
||||
|
||||
|
||||
|
||||
`Function RemoveChatMembers(Val Token, Val ChatID, Val Users) Export`
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Bot token |
|
||||
| ChatID | --chatid | String, Number | Chat ID |
|
||||
| Users | --members | String, Number, Array of String, Number | The member or members of the chat room to remove |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - Serialized JSON response from VK Teams
|
||||
|
||||
<br/>
|
||||
|
||||
:::tip
|
||||
Method at API documentation: [GET /chats/members/delete](https://teams.vk.com/botapi/#/chats/get_chats_members_delete)
|
||||
:::
|
||||
<br/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint vkteams RemoveChatMembers --token %token% --chatid %chatid% --members %members%
|
||||
|
||||
```
|
||||
|
||||
|
||||
4
docs/en/md/VKTeams/Chat-management/_category_.json
Normal file
4
docs/en/md/VKTeams/Chat-management/_category_.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"label": "Chat management",
|
||||
"position": "4"
|
||||
}
|
||||
@@ -1,45 +1,40 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# Check token
|
||||
Checks if the bot token is functional
|
||||
|
||||
|
||||
|
||||
`Function CheckToken(Val Token) Export`
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Bot token |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - Serialized JSON response from VK Teams
|
||||
|
||||
<br/>
|
||||
|
||||
:::tip
|
||||
Method at API documentation: [GET /self/get](https://teams.vk.com/botapi/#/self/get_self_get)
|
||||
:::
|
||||
<br/>
|
||||
|
||||
|
||||
```bsl title="Code example"
|
||||
Token = "001.3501506236.091...";
|
||||
Result = OPI_VKTeams.CheckToken(Token);
|
||||
```
|
||||
|
||||
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint vkteams CheckToken --token %token%
|
||||
|
||||
```
|
||||
|
||||
```json title="Result"
|
||||
{
|
||||
"userId": "1011893356",
|
||||
"ok": true
|
||||
}
|
||||
```
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# Check token
|
||||
Checks if the bot token is functional
|
||||
|
||||
|
||||
|
||||
`Function CheckToken(Val Token) Export`
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Bot token |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - Serialized JSON response from VK Teams
|
||||
|
||||
<br/>
|
||||
|
||||
:::tip
|
||||
Method at API documentation: [GET /self/get](https://teams.vk.com/botapi/#/self/get_self_get)
|
||||
:::
|
||||
<br/>
|
||||
|
||||
|
||||
```bsl title="Code example"
|
||||
Token = "001.3501506236.091...";
|
||||
Result = OPI_VKTeams.CheckToken(Token);
|
||||
```
|
||||
|
||||
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint vkteams CheckToken --token %token%
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -1,61 +1,56 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Get events
|
||||
Receives bot events in Polling mode
|
||||
|
||||
|
||||
|
||||
`Function GetEvents(Val Token, Val LastID, Val Timeout = 0) Export`
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Bot token |
|
||||
| LastID | --last | String, Number | ID of the last event processed before this event |
|
||||
| Timeout | --timeout | String, Number | Connection hold time for Long Polling |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - Serialized JSON response from VK Teams
|
||||
|
||||
<br/>
|
||||
|
||||
:::tip
|
||||
Method at API documentation: [GET /events/get](https://teams.vk.com/botapi/#/events/get_events_get)
|
||||
:::
|
||||
<br/>
|
||||
|
||||
|
||||
```bsl title="Code example"
|
||||
Token = "001.3501506236.091...";
|
||||
LastID = 0;
|
||||
|
||||
For N = 1 To 5 Do // In real work - endless loop
|
||||
|
||||
Result = OPI_VKTeams.GetEvents(Token, LastID, 3);
|
||||
|
||||
Events = Result["events"];
|
||||
|
||||
// Event handling...
|
||||
|
||||
If Not Events.Count() = 0 Then
|
||||
LastID = Events[Events.UBound()]["eventId"];
|
||||
EndIf;
|
||||
|
||||
EndDo;
|
||||
```
|
||||
|
||||
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint vkteams GetEvents --token %token% --last %last% --timeout %timeout%
|
||||
|
||||
```
|
||||
|
||||
```json title="Result"
|
||||
{
|
||||
"events": [],
|
||||
"ok": true
|
||||
}
|
||||
```
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Get events
|
||||
Receives bot events in Polling mode
|
||||
|
||||
|
||||
|
||||
`Function GetEvents(Val Token, Val LastID, Val Timeout = 0) Export`
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Bot token |
|
||||
| LastID | --last | String, Number | ID of the last event processed before this event |
|
||||
| Timeout | --timeout | String, Number | Connection hold time for Long Polling |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - Serialized JSON response from VK Teams
|
||||
|
||||
<br/>
|
||||
|
||||
:::tip
|
||||
Method at API documentation: [GET /events/get](https://teams.vk.com/botapi/#/events/get_events_get)
|
||||
:::
|
||||
<br/>
|
||||
|
||||
|
||||
```bsl title="Code example"
|
||||
Token = "001.3501506236.091...";
|
||||
LastID = 0;
|
||||
|
||||
For N = 1 To 5 Do // In real work - endless loop
|
||||
|
||||
Result = OPI_VKTeams.GetEvents(Token, LastID, 3);
|
||||
|
||||
Events = Result["events"];
|
||||
|
||||
// Event handling...
|
||||
|
||||
If Not Events.Count() = 0 Then
|
||||
LastID = Events[Events.UBound()]["eventId"];
|
||||
EndIf;
|
||||
|
||||
EndDo;
|
||||
```
|
||||
|
||||
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint vkteams GetEvents --token %token% --last %last% --timeout %timeout%
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -1,51 +1,43 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# Get information about file
|
||||
Gets information about a file by ID
|
||||
|
||||
|
||||
|
||||
`Function GetFileInformation(Val Token, Val FileID) Export`
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Bot token |
|
||||
| FileID | --fileid | String, Number | File ID |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - Serialized JSON response from VK Teams
|
||||
|
||||
<br/>
|
||||
|
||||
:::tip
|
||||
Method at API documentation: [GET /files/getInfo](https://teams.vk.com/botapi/#/files/get_files_getInfo)
|
||||
:::
|
||||
<br/>
|
||||
|
||||
|
||||
```bsl title="Code example"
|
||||
Token = "001.3501506236.091...";
|
||||
FileID = "sXhpbA5K2ZCOdG5ROIfRan66ba356d1bd";
|
||||
|
||||
Result = OPI_VKTeams.GetFileInformation(Token, FileID);
|
||||
```
|
||||
|
||||
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint vkteams GetFileInformation --token %token% --fileid %fileid%
|
||||
|
||||
```
|
||||
|
||||
```json title="Result"
|
||||
{
|
||||
"filename": "ImportantDocument.docx",
|
||||
"size": 24071,
|
||||
"type": "application",
|
||||
"url": "https://ub.icq.net/files/get/XrJ30TgJvcpZoiAEu1MC46e1MCbBs3NXwqSkBiZgCEkXOsNmPmAnw2XXpEM4WXMcylct3N2s3XwyMI5Cj7GDKtY6FmpmOHLgYC2xUanmVRf4gtn0zVatipXHgtriTJACrKfemXbqJuLCNOYZJieYS72mwqu1MC/%D0%92%D0%B0%D0%B6%D0%BD%D1%8B%D0%B9%D0%94%D0%BE%D0%BA%D1%83%D0%BC%D0%B5%D0%BD%D1%82.docx",
|
||||
"ok": true
|
||||
}
|
||||
```
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# Get information about file
|
||||
Gets information about a file by ID
|
||||
|
||||
|
||||
|
||||
`Function GetFileInformation(Val Token, Val FileID) Export`
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Bot token |
|
||||
| FileID | --fileid | String, Number | File ID |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - Serialized JSON response from VK Teams
|
||||
|
||||
<br/>
|
||||
|
||||
:::tip
|
||||
Method at API documentation: [GET /files/getInfo](https://teams.vk.com/botapi/#/files/get_files_getInfo)
|
||||
:::
|
||||
<br/>
|
||||
|
||||
|
||||
```bsl title="Code example"
|
||||
Token = "001.3501506236.091...";
|
||||
FileID = "sXhpbA5K2ZCOdG5ROIfRan66ba356d1bd";
|
||||
|
||||
Result = OPI_VKTeams.GetFileInformation(Token, FileID);
|
||||
```
|
||||
|
||||
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint vkteams GetFileInformation --token %token% --fileid %fileid%
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -1,45 +1,45 @@
|
||||
---
|
||||
sidebar_position: 5
|
||||
---
|
||||
|
||||
# Delete message
|
||||
Deletes a message by ID
|
||||
|
||||
|
||||
|
||||
`Function DeleteMessage(Val Token, Val ChatID, Val MessageID) Export`
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Bot token |
|
||||
| ChatID | --chatid | String, Number | Chat ID for message sending |
|
||||
| MessageID | --messageid | String, Number | Message ID for editing |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - Serialized JSON response from VK Teams
|
||||
|
||||
<br/>
|
||||
|
||||
:::tip
|
||||
Method at API documentation: [GET /messages/deleteMessages](https://teams.vk.com/botapi/#/messages/get_messages_deleteMessages)
|
||||
:::
|
||||
<br/>
|
||||
|
||||
|
||||
```bsl title="Code example"
|
||||
Token = "001.3501506236.091...";
|
||||
ChatID = "689203963@chat.agent";
|
||||
MessageID = "7402287649739767956";
|
||||
|
||||
Result = OPI_VKTeams.DeleteMessage(Token, ChatID, MessageID);
|
||||
```
|
||||
|
||||
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint vkteams DeleteMessage --token %token% --chatid %chatid% --messageid %messageid%
|
||||
|
||||
```
|
||||
|
||||
|
||||
---
|
||||
sidebar_position: 5
|
||||
---
|
||||
|
||||
# Delete message
|
||||
Deletes a message by ID
|
||||
|
||||
|
||||
|
||||
`Function DeleteMessage(Val Token, Val ChatID, Val MessageID) Export`
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Bot token |
|
||||
| ChatID | --chatid | String, Number | Chat ID for message sending |
|
||||
| MessageID | --messageid | String, Number | Message ID for editing |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - Serialized JSON response from VK Teams
|
||||
|
||||
<br/>
|
||||
|
||||
:::tip
|
||||
Method at API documentation: [GET /messages/deleteMessages](https://teams.vk.com/botapi/#/messages/get_messages_deleteMessages)
|
||||
:::
|
||||
<br/>
|
||||
|
||||
|
||||
```bsl title="Code example"
|
||||
Token = "001.3501506236.091...";
|
||||
ChatID = "689203963@chat.agent";
|
||||
MessageID = "7402287649739767956";
|
||||
|
||||
Result = OPI_VKTeams.DeleteMessage(Token, ChatID, MessageID);
|
||||
```
|
||||
|
||||
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint vkteams DeleteMessage --token %token% --chatid %chatid% --messageid %messageid%
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -1,59 +1,55 @@
|
||||
---
|
||||
sidebar_position: 4
|
||||
---
|
||||
|
||||
# Change the message text
|
||||
Changes the text of an existing message
|
||||
|
||||
|
||||
|
||||
`Function EditMessageText(Val Token, Val ChatID, Val MessageID, Val Text, Val Markup = "MarkdownV2") Export`
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Bot token |
|
||||
| ChatID | --chatid | String, Number | Chat ID for message sending |
|
||||
| MessageID | --messageid | String, Number | Message ID for editing |
|
||||
| Text | --text | String | New message text |
|
||||
| Markup | --parsemod | String | Markup type for message text: MarkdownV2 or HTML |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - Serialized JSON response from VK Teams
|
||||
|
||||
<br/>
|
||||
|
||||
:::tip
|
||||
You can mention a user by appending their userId to the text in the following format @[userId]
|
||||
|
||||
Method at API documentation: [GET /messages/editText](https://teams.vk.com/botapi/#/messages/get_messages_editText)
|
||||
:::
|
||||
<br/>
|
||||
|
||||
|
||||
```bsl title="Code example"
|
||||
Token = "001.3501506236.091...";
|
||||
ChatID = "689203963@chat.agent";
|
||||
MessageID = "7402287649739767956";
|
||||
Text = "New message text";
|
||||
|
||||
Result = OPI_VKTeams.EditMessageText(Token, ChatID, MessageID, Text);
|
||||
|
||||
Text = "<b>New bold message text</b>";
|
||||
Markup = "HTML";
|
||||
|
||||
Result = OPI_VKTeams.EditMessageText(Token, ChatID, MessageID, Text, Markup);
|
||||
```
|
||||
|
||||
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint vkteams EditMessageText --token %token% --chatid %chatid% --messageid %messageid% --text %text% --parsemod %parsemod%
|
||||
|
||||
```
|
||||
|
||||
```json title="Result"
|
||||
{
|
||||
"ok": true
|
||||
}
|
||||
```
|
||||
---
|
||||
sidebar_position: 4
|
||||
---
|
||||
|
||||
# Change the message text
|
||||
Changes the text of an existing message
|
||||
|
||||
|
||||
|
||||
`Function EditMessageText(Val Token, Val ChatID, Val MessageID, Val Text, Val Markup = "MarkdownV2") Export`
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Bot token |
|
||||
| ChatID | --chatid | String, Number | Chat ID for message sending |
|
||||
| MessageID | --messageid | String, Number | Message ID for editing |
|
||||
| Text | --text | String | New message text |
|
||||
| Markup | --parsemod | String | Markup type for message text: MarkdownV2 or HTML |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - Serialized JSON response from VK Teams
|
||||
|
||||
<br/>
|
||||
|
||||
:::tip
|
||||
You can mention a user by appending their userId to the text in the following format @[userId]
|
||||
|
||||
Method at API documentation: [GET /messages/editText](https://teams.vk.com/botapi/#/messages/get_messages_editText)
|
||||
:::
|
||||
<br/>
|
||||
|
||||
|
||||
```bsl title="Code example"
|
||||
Token = "001.3501506236.091...";
|
||||
ChatID = "689203963@chat.agent";
|
||||
MessageID = "7402287649739767956";
|
||||
Text = "New message text";
|
||||
|
||||
Result = OPI_VKTeams.EditMessageText(Token, ChatID, MessageID, Text);
|
||||
|
||||
Text = "<b>New bold message text</b>";
|
||||
Markup = "HTML";
|
||||
|
||||
Result = OPI_VKTeams.EditMessageText(Token, ChatID, MessageID, Text, Markup);
|
||||
```
|
||||
|
||||
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint vkteams EditMessageText --token %token% --chatid %chatid% --messageid %messageid% --text %text% --parsemod %parsemod%
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -1,59 +1,54 @@
|
||||
---
|
||||
sidebar_position: 8
|
||||
---
|
||||
|
||||
# Forward message
|
||||
Forwards an existing message to the current dialog box
|
||||
|
||||
|
||||
|
||||
`Function ForwardMessage(Val Token, Val MessageID, Val FromChatID, Val ChatID, Val Text = "") Export`
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Bot token |
|
||||
| MessageID | --message | String, Number | Original message ID |
|
||||
| FromChatID | --fromid | String, Number | Source chat ID |
|
||||
| ChatID | --chatid | String, Number | Chat ID for message sending |
|
||||
| Text | --text | String | Additional message text |
|
||||
|
||||
|
||||
Returns: HTTPResponse - Forward message
|
||||
|
||||
<br/>
|
||||
|
||||
:::tip
|
||||
Only the chatId from events can be passed to the FromChatID (the code from the chat link is not suitable))
|
||||
|
||||
Method at API documentation: [GET /messages/sendText](https://teams.vk.com/botapi/#/messages/get_messages_sendText)
|
||||
:::
|
||||
<br/>
|
||||
|
||||
|
||||
```bsl title="Code example"
|
||||
Token = "001.3501506236.091...";
|
||||
ChatID = "AoLI0egLWBSLR1Ngn2w";
|
||||
FromChatID = "689203963@chat.agent";
|
||||
MessageID = "7402287649739767956";
|
||||
|
||||
Result = OPI_VKTeams.ForwardMessage(Token, MessageID, FromChatID, ChatID);
|
||||
|
||||
Text = "Additional text";
|
||||
|
||||
Result = OPI_VKTeams.ForwardMessage(Token, MessageID, FromChatID, ChatID, Text);
|
||||
```
|
||||
|
||||
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint vkteams ForwardMessage --token %token% --message %message% --fromid %fromid% --chatid %chatid% --text %text%
|
||||
|
||||
```
|
||||
|
||||
```json title="Result"
|
||||
{
|
||||
"msgId": "7401634788940972096",
|
||||
"ok": true
|
||||
}
|
||||
```
|
||||
---
|
||||
sidebar_position: 8
|
||||
---
|
||||
|
||||
# Forward message
|
||||
Forwards an existing message to the current dialog box
|
||||
|
||||
|
||||
|
||||
`Function ForwardMessage(Val Token, Val MessageID, Val FromChatID, Val ChatID, Val Text = "") Export`
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Bot token |
|
||||
| MessageID | --message | String, Number | Original message ID |
|
||||
| FromChatID | --fromid | String, Number | Source chat ID |
|
||||
| ChatID | --chatid | String, Number | Chat ID for message sending |
|
||||
| Text | --text | String | Additional message text |
|
||||
|
||||
|
||||
Returns: HTTPResponse - Forward message
|
||||
|
||||
<br/>
|
||||
|
||||
:::tip
|
||||
Only the chatId from events can be passed to the FromChatID (the code from the chat link is not suitable))
|
||||
|
||||
Method at API documentation: [GET /messages/sendText](https://teams.vk.com/botapi/#/messages/get_messages_sendText)
|
||||
:::
|
||||
<br/>
|
||||
|
||||
|
||||
```bsl title="Code example"
|
||||
Token = "001.3501506236.091...";
|
||||
ChatID = "AoLI0egLWBSLR1Ngn2w";
|
||||
FromChatID = "689203963@chat.agent";
|
||||
MessageID = "7402287649739767956";
|
||||
|
||||
Result = OPI_VKTeams.ForwardMessage(Token, MessageID, FromChatID, ChatID);
|
||||
|
||||
Text = "Additional text";
|
||||
|
||||
Result = OPI_VKTeams.ForwardMessage(Token, MessageID, FromChatID, ChatID, Text);
|
||||
```
|
||||
|
||||
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint vkteams ForwardMessage --token %token% --message %message% --fromid %fromid% --chatid %chatid% --text %text%
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -1,55 +1,49 @@
|
||||
---
|
||||
sidebar_position: 6
|
||||
---
|
||||
|
||||
# Resend file
|
||||
Sends a previously uploaded file by ID
|
||||
|
||||
|
||||
|
||||
`Function ResendFile(Val Token, Val ChatID, Val FileID, Val Text = "", Val FileName = "", Val Markup = "MarkdownV2") Export`
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Bot token |
|
||||
| ChatID | --chatid | String, Number | Chat ID for sending |
|
||||
| FileID | --fileid | String, Number | File ID to send |
|
||||
| Text | --text | String | File caption |
|
||||
| FileName | --filename | String | Displayed file name |
|
||||
| Markup | --parsemod | String | Markup type for message text: MarkdownV2 or HTML |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - Serialized JSON response from VK Teams
|
||||
|
||||
<br/>
|
||||
|
||||
:::tip
|
||||
Method at API documentation: [GET /messages/sendFile](https://teams.vk.com/botapi/#/messages/get_messages_sendFile)
|
||||
:::
|
||||
<br/>
|
||||
|
||||
|
||||
```bsl title="Code example"
|
||||
Token = "001.3501506236.091...";
|
||||
ChatID = "AoLI0egLWBSLR1Ngn2w";
|
||||
FileID = "sXhpbA5K2ZCOdG5ROIfRan66ba356d1bd";
|
||||
Text = "File caption";
|
||||
|
||||
Result = OPI_VKTeams.ResendFile(Token, ChatID, FileID, Text, "SameDoc.docx");
|
||||
```
|
||||
|
||||
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint vkteams ResendFile --token %token% --chatid %chatid% --fileid %fileid% --text %text% --filename %filename% --parsemod %parsemod%
|
||||
|
||||
```
|
||||
|
||||
```json title="Result"
|
||||
{
|
||||
"fileId": "XrJ30XSsGyVg0tOK52eUzi66b7e3a21bd",
|
||||
"msgId": "7401634819005743172",
|
||||
"ok": true
|
||||
}
|
||||
```
|
||||
---
|
||||
sidebar_position: 6
|
||||
---
|
||||
|
||||
# Resend file
|
||||
Sends a previously uploaded file by ID
|
||||
|
||||
|
||||
|
||||
`Function ResendFile(Val Token, Val ChatID, Val FileID, Val Text = "", Val FileName = "", Val Markup = "MarkdownV2") Export`
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Bot token |
|
||||
| ChatID | --chatid | String, Number | Chat ID for sending |
|
||||
| FileID | --fileid | String, Number | File ID to send |
|
||||
| Text | --text | String | File caption |
|
||||
| FileName | --filename | String | Displayed file name |
|
||||
| Markup | --parsemod | String | Markup type for message text: MarkdownV2 or HTML |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - Serialized JSON response from VK Teams
|
||||
|
||||
<br/>
|
||||
|
||||
:::tip
|
||||
Method at API documentation: [GET /messages/sendFile](https://teams.vk.com/botapi/#/messages/get_messages_sendFile)
|
||||
:::
|
||||
<br/>
|
||||
|
||||
|
||||
```bsl title="Code example"
|
||||
Token = "001.3501506236.091...";
|
||||
ChatID = "AoLI0egLWBSLR1Ngn2w";
|
||||
FileID = "sXhpbA5K2ZCOdG5ROIfRan66ba356d1bd";
|
||||
Text = "File caption";
|
||||
|
||||
Result = OPI_VKTeams.ResendFile(Token, ChatID, FileID, Text, "SameDoc.docx");
|
||||
```
|
||||
|
||||
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint vkteams ResendFile --token %token% --chatid %chatid% --fileid %fileid% --text %text% --filename %filename% --parsemod %parsemod%
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -1,45 +1,38 @@
|
||||
---
|
||||
sidebar_position: 7
|
||||
---
|
||||
|
||||
# Resend voice
|
||||
Sends a previously uploaded voice message by ID
|
||||
|
||||
|
||||
|
||||
`Function ResendVoice(Val Token, Val ChatID, Val FileID) Export`
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Bot token |
|
||||
| ChatID | --chatid | String, Number | Chat ID for sending |
|
||||
| FileID | --fileid | String, Number | File ID of voice message |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - Serialized JSON response from VK Teams
|
||||
|
||||
<br/>
|
||||
|
||||
:::tip
|
||||
Method at API documentation: [GET /messages/sendVoice](https://teams.vk.com/botapi/#/messages/get_messages_sendVoice)
|
||||
:::
|
||||
<br/>
|
||||
|
||||
|
||||
```bsl title="Code example"
|
||||
Token = "001.3501506236.091...";
|
||||
ChatID = "AoLI0egLWBSLR1Ngn2w";
|
||||
FileID = "I000bPVBYaNQkn9Fg3oY0066ba35811bd";
|
||||
|
||||
Result = OPI_VKTeams.ResendVoice(Token, ChatID, FileID);
|
||||
```
|
||||
|
||||
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint vkteams ResendVoice --token "001.3501506236.091..." --chatid "AoLI0egLWBSLR1Ngn2w" --fileid "I000bPVBYaNQkn9Fg3oY0066ba35811bd"
|
||||
|
||||
```
|
||||
|
||||
|
||||
---
|
||||
sidebar_position: 7
|
||||
---
|
||||
|
||||
# Resend voice
|
||||
Sends a previously uploaded voice message by ID
|
||||
|
||||
|
||||
|
||||
`Function ResendVoice(Val Token, Val ChatID, Val FileID) Export`
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Bot token |
|
||||
| ChatID | --chatid | String, Number | Chat ID for sending |
|
||||
| FileID | --fileid | String, Number | File ID of voice message |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - Serialized JSON response from VK Teams
|
||||
|
||||
<br/>
|
||||
|
||||
:::tip
|
||||
Method at API documentation: [GET /messages/sendVoice](https://teams.vk.com/botapi/#/messages/get_messages_sendVoice)
|
||||
:::
|
||||
<br/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint vkteams ResendVoice --token "001.3501506236.091..." --chatid "AoLI0egLWBSLR1Ngn2w" --fileid "I000bPVBYaNQkn9Fg3oY0066ba35811bd"
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -1,65 +1,59 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Send file
|
||||
Sends the file to the chat
|
||||
|
||||
|
||||
|
||||
`Function SendFile(Val Token, Val ChatID, Val File, Val Text = "", Val FileName = "", Val Markup = "MarkdownV2") Export`
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Bot token |
|
||||
| ChatID | --chatid | String, Number | Chat ID for sending |
|
||||
| File | --file | BinaryData, String | File for sending |
|
||||
| Text | --text | String | File caption |
|
||||
| FileName | --filename | String | Displayed file name |
|
||||
| Markup | --parsemod | String | Markup type for message text: MarkdownV2 or HTML |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - Serialized JSON response from VK Teams
|
||||
|
||||
<br/>
|
||||
|
||||
:::tip
|
||||
Method at API documentation: [POST /messages/sendFile](https://teams.vk.com/botapi/#/messages/post_messages_sendFile)
|
||||
:::
|
||||
<br/>
|
||||
|
||||
|
||||
```bsl title="Code example"
|
||||
Token = "001.3501506236.091...";
|
||||
ChatID = "AoLI0egLWBSLR1Ngn2w";
|
||||
Text = "File caption";
|
||||
|
||||
File = "https://openintegrations.dev/test_data/document.docx"; // URL
|
||||
FilePath = GetTempFileName("docx"); // Path
|
||||
|
||||
FileCopy(File, FilePath);
|
||||
|
||||
FileBD = New BinaryData(FilePath); // Binary
|
||||
|
||||
Result = OPI_VKTeams.SendFile(Token, ChatID, File);
|
||||
|
||||
Result = OPI_VKTeams.SendFile(Token, ChatID, FilePath, Text);
|
||||
|
||||
Result = OPI_VKTeams.SendFile(Token, ChatID, File, Text, "ImportantDocument.docx");
|
||||
```
|
||||
|
||||
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint vkteams SendFile --token %token% --chatid %chatid% --file %file% --text %text% --filename %filename% --parsemod %parsemod%
|
||||
|
||||
```
|
||||
|
||||
```json title="Result"
|
||||
{
|
||||
"fileId": "XrJ30XSsGyVg0tOK52eUzi66b7e3a21bd",
|
||||
"msgId": "7401634797530906691",
|
||||
"ok": true
|
||||
}
|
||||
```
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Send file
|
||||
Sends the file to the chat
|
||||
|
||||
|
||||
|
||||
`Function SendFile(Val Token, Val ChatID, Val File, Val Text = "", Val FileName = "", Val Markup = "MarkdownV2") Export`
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Bot token |
|
||||
| ChatID | --chatid | String, Number | Chat ID for sending |
|
||||
| File | --file | BinaryData, String | File for sending |
|
||||
| Text | --text | String | File caption |
|
||||
| FileName | --filename | String | Displayed file name |
|
||||
| Markup | --parsemod | String | Markup type for message text: MarkdownV2 or HTML |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - Serialized JSON response from VK Teams
|
||||
|
||||
<br/>
|
||||
|
||||
:::tip
|
||||
Method at API documentation: [POST /messages/sendFile](https://teams.vk.com/botapi/#/messages/post_messages_sendFile)
|
||||
:::
|
||||
<br/>
|
||||
|
||||
|
||||
```bsl title="Code example"
|
||||
Token = "001.3501506236.091...";
|
||||
ChatID = "AoLI0egLWBSLR1Ngn2w";
|
||||
Text = "File caption";
|
||||
|
||||
File = "https://openintegrations.dev/test_data/document.docx"; // URL
|
||||
FilePath = GetTempFileName("docx"); // Path
|
||||
|
||||
FileCopy(File, FilePath);
|
||||
|
||||
FileBD = New BinaryData(FilePath); // Binary
|
||||
|
||||
Result = OPI_VKTeams.SendFile(Token, ChatID, File);
|
||||
|
||||
Result = OPI_VKTeams.SendFile(Token, ChatID, FilePath, Text);
|
||||
|
||||
Result = OPI_VKTeams.SendFile(Token, ChatID, File, Text, "ImportantDocument.docx");
|
||||
```
|
||||
|
||||
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint vkteams SendFile --token %token% --chatid %chatid% --file %file% --text %text% --filename %filename% --parsemod %parsemod%
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -1,62 +1,57 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# Send text message
|
||||
Sends a text message to a chat
|
||||
|
||||
|
||||
|
||||
`Function SendTextMessage(Val Token, Val ChatID, Val Text, Val ReplyID = 0, Val Keyboard = "", Val Markup = "MarkdownV2") Export`
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Bot token |
|
||||
| ChatID | --chatid | String, Number | Chat ID for message sending |
|
||||
| Text | --text | String | Message text |
|
||||
| ReplyID | --reply | String, Number | Replying message id if necessary |
|
||||
| Keyboard | --keyboard | Array Of String | Buttons to the message if necessary |
|
||||
| Markup | --parsemod | String | Markup type for message text: MarkdownV2 or HTML |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - Serialized JSON response from VK Teams
|
||||
|
||||
<br/>
|
||||
|
||||
:::tip
|
||||
You can mention a user by appending their userId to the text in the following format @[userId]
|
||||
|
||||
Method at API documentation: [GET /messages/sendText](https://teams.vk.com/botapi/#/messages/get_messages_sendText)
|
||||
:::
|
||||
<br/>
|
||||
|
||||
|
||||
```bsl title="Code example"
|
||||
Token = "001.3501506236.091...";
|
||||
ChatID = "AoLI0egLWBSLR1Ngn2w";
|
||||
Text = "Message text";
|
||||
|
||||
Result = OPI_VKTeams.SendTextMessage(Token, ChatID, Text);
|
||||
|
||||
ChatID = "689203963@chat.agent";
|
||||
ReplyID = "7402287649739767956";
|
||||
Text = "<b>Bold text</b>";
|
||||
Markup = "HTML";
|
||||
|
||||
Result = OPI_VKTeams.SendTextMessage(Token, ChatID, Text, ReplyID,, Markup);
|
||||
```
|
||||
|
||||
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint vkteams SendTextMessage --token %token% --chatid %chatid% --text %text% --reply %reply% --keyboard %keyboard% --parsemod %parsemod%
|
||||
|
||||
```
|
||||
|
||||
```json title="Result"
|
||||
{
|
||||
"msgId": "7401135795345555471",
|
||||
"ok": true
|
||||
}
|
||||
```
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# Send text message
|
||||
Sends a text message to a chat
|
||||
|
||||
|
||||
|
||||
`Function SendTextMessage(Val Token, Val ChatID, Val Text, Val ReplyID = 0, Val Keyboard = "", Val Markup = "MarkdownV2") Export`
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Bot token |
|
||||
| ChatID | --chatid | String, Number | Chat ID for message sending |
|
||||
| Text | --text | String | Message text |
|
||||
| ReplyID | --reply | String, Number | Replying message id if necessary |
|
||||
| Keyboard | --keyboard | Array Of String | Buttons to the message if necessary |
|
||||
| Markup | --parsemod | String | Markup type for message text: MarkdownV2 or HTML |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - Serialized JSON response from VK Teams
|
||||
|
||||
<br/>
|
||||
|
||||
:::tip
|
||||
You can mention a user by appending their userId to the text in the following format @[userId]
|
||||
|
||||
Method at API documentation: [GET /messages/sendText](https://teams.vk.com/botapi/#/messages/get_messages_sendText)
|
||||
:::
|
||||
<br/>
|
||||
|
||||
|
||||
```bsl title="Code example"
|
||||
Token = "001.3501506236.091...";
|
||||
ChatID = "AoLI0egLWBSLR1Ngn2w";
|
||||
Text = "Message text";
|
||||
|
||||
Result = OPI_VKTeams.SendTextMessage(Token, ChatID, Text);
|
||||
|
||||
ChatID = "689203963@chat.agent";
|
||||
ReplyID = "7402287649739767956";
|
||||
Text = "<b>Bold text</b>";
|
||||
Markup = "HTML";
|
||||
|
||||
Result = OPI_VKTeams.SendTextMessage(Token, ChatID, Text, ReplyID,, Markup);
|
||||
```
|
||||
|
||||
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint vkteams SendTextMessage --token %token% --chatid %chatid% --text %text% --reply %reply% --keyboard %keyboard% --parsemod %parsemod%
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -1,62 +1,62 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# Send voice
|
||||
Sends an audio file as a voice message
|
||||
|
||||
|
||||
|
||||
`Function SendVoice(Val Token, Val ChatID, Val File, Val FileType = "m4a", Val ReplyID = 0, Val Keyboard = "") Export`
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Bot token |
|
||||
| ChatID | --chatid | String, Number | Chat ID for sending |
|
||||
| File | --file | BinaryData, String | File for sending |
|
||||
| FileType | --type | String | Audio type: aac, ogg or m4a |
|
||||
| ReplyID | --reply | String, Number | Replying message id if necessary |
|
||||
| Keyboard | --keyboard | Array Of String | Buttons to the message if necessary |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - Serialized JSON response from VK Teams
|
||||
|
||||
<br/>
|
||||
|
||||
:::tip
|
||||
If you want the client to display this file as a playable voice message, it must be in aac, ogg, or m4a format
|
||||
|
||||
Method at API documentation: [POST /messages/sendVoice](https://teams.vk.com/botapi/#/messages/post_messages_sendVoice)
|
||||
:::
|
||||
<br/>
|
||||
|
||||
|
||||
```bsl title="Code example"
|
||||
Token = "001.3501506236.091...";
|
||||
ChatID = "689203963@chat.agent";
|
||||
ReplyID = "7402287649739767956";
|
||||
Text = "File caption";
|
||||
|
||||
File = "https://openintegrations.dev/test_data/song.m4a" ; // URL
|
||||
FilePath = GetTempFileName("m4a"); // Path
|
||||
|
||||
FileCopy(File, FilePath);
|
||||
|
||||
FileBD = New BinaryData(FilePath); // Binary
|
||||
|
||||
Result = OPI_VKTeams.SendVoice(Token, ChatID, File);
|
||||
|
||||
Result = OPI_VKTeams.SendVoice(Token, ChatID, FilePath,,ReplyID);
|
||||
|
||||
Result = OPI_VKTeams.SendVoice(Token, ChatID, File);
|
||||
```
|
||||
|
||||
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint vkteams SendVoice --token "001.3501506236.091..." --chatid "689203963@chat.agent" --file "https://openintegrations.dev/test_data/song.m4a" --type %type% --reply "7401868177463836806" --keyboard %keyboard%
|
||||
|
||||
```
|
||||
|
||||
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# Send voice
|
||||
Sends an audio file as a voice message
|
||||
|
||||
|
||||
|
||||
`Function SendVoice(Val Token, Val ChatID, Val File, Val FileType = "m4a", Val ReplyID = 0, Val Keyboard = "") Export`
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Bot token |
|
||||
| ChatID | --chatid | String, Number | Chat ID for sending |
|
||||
| File | --file | BinaryData, String | File for sending |
|
||||
| FileType | --type | String | Audio type: aac, ogg or m4a |
|
||||
| ReplyID | --reply | String, Number | Replying message id if necessary |
|
||||
| Keyboard | --keyboard | Array Of String | Buttons to the message if necessary |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - Serialized JSON response from VK Teams
|
||||
|
||||
<br/>
|
||||
|
||||
:::tip
|
||||
If you want the client to display this file as a playable voice message, it must be in aac, ogg, or m4a format
|
||||
|
||||
Method at API documentation: [POST /messages/sendVoice](https://teams.vk.com/botapi/#/messages/post_messages_sendVoice)
|
||||
:::
|
||||
<br/>
|
||||
|
||||
|
||||
```bsl title="Code example"
|
||||
Token = "001.3501506236.091...";
|
||||
ChatID = "689203963@chat.agent";
|
||||
ReplyID = "7402287649739767956";
|
||||
Text = "File caption";
|
||||
|
||||
File = "https://openintegrations.dev/test_data/song.m4a" ; // URL
|
||||
FilePath = GetTempFileName("m4a"); // Path
|
||||
|
||||
FileCopy(File, FilePath);
|
||||
|
||||
FileBD = New BinaryData(FilePath); // Binary
|
||||
|
||||
Result = OPI_VKTeams.SendVoice(Token, ChatID, File);
|
||||
|
||||
Result = OPI_VKTeams.SendVoice(Token, ChatID, FilePath,,ReplyID);
|
||||
|
||||
Result = OPI_VKTeams.SendVoice(Token, ChatID, File);
|
||||
```
|
||||
|
||||
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint vkteams SendVoice --token "001.3501506236.091..." --chatid "689203963@chat.agent" --file "https://openintegrations.dev/test_data/song.m4a" --type %type% --reply "7401868177463836806" --keyboard %keyboard%
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user