1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-01-28 05:46:35 +02:00
Vitaly the Alpaca (bot) a7b091d23e Main build (Jenkins)
2024-09-17 15:57:44 +03:00

20 lines
631 B
Plaintext

Token = FunctionParameters["Telegram_Token"];
ChatID = FunctionParameters["Telegram_ChatID"];
Text = FunctionParameters["String"];
Image = FunctionParameters["Picture"];
Video = FunctionParameters["Video"];
ImagePath = GetTempFileName("png");
CopyFile(Image, ImagePath);
VideoPath = GetTempFileName("mp4");
CopyFile(Video, VideoPath);
VideoDD = New BinaryData(VideoPath);
MediaGroup = New Map;
MediaGroup.Insert(ImagePath, "photo");
MediaGroup.Insert(VideoDD , "video");
Result = OPI_Telegram.SendMediaGroup(Token, ChatID, Text, MediaGroup);