2025-10-21 11:36:43 +03:00
|
|
|
Token = "6129457865:AAFyzNYOAFbu...";
|
|
|
|
|
ChatID = "461699897";
|
|
|
|
|
ChannelID = "@testsichee";
|
|
|
|
|
Text = "Строковое значение";
|
|
|
|
|
Image = "https://hut.openintegrations.dev/test_data/picture.jpg";
|
2025-09-12 16:37:40 +03:00
|
|
|
|
|
|
|
|
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);
|