This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using (FileStream fs = System.IO.File.OpenRead("c:\test.txt")) | |
{ | |
Telegram.Bot.Types.InputFiles.InputOnlineFile inputOnlineFile = new Telegram.Bot | |
.Types.InputFiles.InputOnlineFile(fs, "FileName.txt"); | |
await Bot.SendDocumentAsync( | |
chatId: new Telegram.Bot.Types.ChatId(1234), | |
document: inputOnlineFile, | |
caption: "User Manual", | |
parseMode: ParseMode.Markdown); | |
} |