2021年1月4日星期一

How to send a message in Telegram using SendMediaGroup with Text Message? [closed]

I want to send an Album with Text message and this is my code in C#:

    private void CInPrbdg_Click(object sender, RoutedEventArgs e)      {        List<FileStream> streams = new List<FileStream>          {              System.IO.File.OpenRead(imgpath1),              System.IO.File.OpenRead(imgpath2),          };            List<InputMediaPhoto> media = new List<InputMediaPhoto>();            foreach(var stream in streams)          {              media.Add(new InputMediaPhoto(new InputMedia(stream, stream.Name))               {                  Caption = txt1,                  ParseMode = ParseMode.Markdown              });          }            await Vbot.SendMediaGroupAsync(media, chatid);      }  

This code shows that the caption will only show like this: Image with Caption in Telegram but i want it to be like this: Album with Text Message. Thank you.

https://stackoverflow.com/questions/65572385/how-to-send-a-message-in-telegram-using-sendmediagroup-with-text-message January 05, 2021 at 10:22AM

没有评论:

发表评论