Closed ahmetbasdan closed 2 years ago
Please follow issue template If you want to chat, feel free to join our group.
Did you find the solution, because once I updated Telegram.Bot to (19.0.0.0) version I could not use this code anymore.
me too... as if there's no InputOnlineFile a method. I'm stuck. the only way for me to return back older version of telegram.bot.
Now I just use the following commands: async static Task SendVideo(ITelegramBotClient BotClient, Update update, CancellationToken arg3, Message message, string filename) { try { using (var videoStream = System.IO.File.OpenRead(@"D:\VideosAPI\Video")) { await BotClient.SendVideoAsync( chatId: message.Chat.Id, video: new InputFileStream(videoStream, "video.mp4"), // Use InputFileStream for local files supportsStreaming: true, cancellationToken: arg3 ); } Console.WriteLine("Video sent successfully!"); } catch (Exception ex) { Console.WriteLine($"Failed to send the video: {ex.Message}"); } }. Bbecause I keep video on my computer.
So guys there is an abstract class. I used it's InputFile.FromStream(stream, "Points.xlsx") method. All work fine 👯
it does not send the pdf file I have selected to telegram