1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2024-12-16 11:38:11 +02:00
OpenIntegrations/docs/en/examples/VKTeams/SendVoice.txt
2024-08-13 14:35:37 +03:00

22 lines
713 B
Plaintext

Token = FunctionParameters["VkTeams_Token"];
ChatID = FunctionParameters["VkTeams_ChatID2"];
ReplyID = FunctionParameters["VkTeams_MessageID"];
Text = "File caption";
File = FunctionParameters["Audio2"] ; // URL
FilePath = GetTempFileName("m4a"); // Path
CopyFile(File, FilePath);
FileBD = New BinaryData(FilePath); // Binary
Result = OPI_VKTeams.SendVoice(Token, ChatID, File);
OPI_TestDataRetrieval.WriteLog(Result, "SendVoice (URL)", "VkTeams");
Result = OPI_VKTeams.SendVoice(Token, ChatID, FilePath, ,ReplyID);
OPI_TestDataRetrieval.WriteLog(Result, "SendVoice (Path)", "VkTeams");
Result = OPI_VKTeams.SendVoice(Token, ChatID, File);