1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-11-27 22:18:36 +02:00
Files
OpenIntegrations/docs/en/examples/Telegram/SendImage.txt
Vitaly the Alpaca (bot) 3c9eb7d3db Main build (Jenkins)
2025-09-22 22:16:56 +03:00

20 lines
649 B
Plaintext
Vendored

Token = "6129457865:AAFyzNYOAFbu...";
ChatID = "461699897";
ChannelID = "@testsichee";
Text = "Строковое значение";
Image = "https://hut.openintegrations.dev/test_data/picture.jpg";
ImagePath = GetTempFileName("png");
CopyFile(Image, ImagePath);
ImageDD = New BinaryData(ImagePath);
// In chat, by URL
Result = OPI_Telegram.SendImage(Token, ChatID, Text, Image);
// To channel, on disk
Result = OPI_Telegram.SendImage(Token, ChannelID, Text, ImagePath);
// To channel, from binary data
Result = OPI_Telegram.SendImage(Token, ChannelID, Text, ImageDD);