You've already forked OpenIntegrations
mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-11-27 22:18:36 +02:00
20 lines
649 B
Plaintext
Vendored
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);
|