mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-01-28 05:46:35 +02:00
20 lines
631 B
Plaintext
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);
|