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

20 lines
649 B
Plaintext
Raw Normal View History

2025-09-12 16:37:40 +03:00
 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);
2025-09-22 22:16:56 +03:00
// In chat, by URL
2025-09-12 16:37:40 +03:00
Result = OPI_Telegram.SendImage(Token, ChatID, Text, Image);
2025-09-22 22:16:56 +03:00
// To channel, on disk
2025-09-12 16:37:40 +03:00
Result = OPI_Telegram.SendImage(Token, ChannelID, Text, ImagePath);
2025-09-22 22:16:56 +03:00
// To channel, from binary data
2025-09-12 16:37:40 +03:00
Result = OPI_Telegram.SendImage(Token, ChannelID, Text, ImageDD);