如何在电报Bot C#中将图像附加到长文本

时间:2018-06-25 12:51:55

标签: c# telegram telegram-bot

我的代码是:

    if (message.Type == MessageType.Photo)
       {
var file = await bot.GetFileAsync(message.Photo.LastOrDefault()?.FileId);

     var uri = string.Format("https://api.telegram.org/file/bot{0}/{1}", token, file.FilePath);



        var finaltext = string.Format("<a href=\"{1}\"> </a>\n{0}", ClassTemp.myVariable, uri);

        await bot.SendTextMessageAsync(chatId, finaltext, ParseMode.Html);
    }

但是在消息中不要在消息末尾显示任何图像。

请引导我。 tnx

0 个答案:

没有答案