1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2026-05-20 10:00:46 +02:00
Files
OpenIntegrations/docs/en/examples/Telegram/SendAudio.txt
T
Vitaly the Alpaca (bot) c25ed70ac3 Main build (Jenkins)
2026-02-13 14:09:07 +03:00

19 lines
642 B
Plaintext
Vendored

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