Ребята, нужна помощь насчёт тг бота. Нужно сделать так, чтобы при нажатии на InlineKeyboardButton (Она называется *****ой), мне отправляло картинку и были ещё подобные кнопки под этой картинкой. using System; using System.Collections.Generic; using Telegram.Bot; using Telegram.Bot.Args; using Telegram.Bot.Types.ReplyMarkups; using System.IO; using System.Linq; using System.Threading; namespace GoOn { class Program { private static string token { get; set; } = "token"; private static TelegramBotClient client; static void Main(string[] args) { client = new TelegramBotClient(token); client.StartReceiving(); client.OnMessage += OnMessageHandler; Console.ReadLine(); client.StopReceiving(); } [Obsolete] private static async void OnMessageHandler(object sender, MessageEventArgs e) { var msg = e.Message; switch (msg.Text) { case "/start": var message = client.SendTextMessageAsync(msg.Chat.Id, "aga", replyMarkup: GetButtons()); break; case "Хочу приобрести товары": var picture = client.SendPhotoAsync(chatId: msg.Chat.Id, photo: "photo", replyMarkup: GetInLineBottons("Шо")).Result; break; } } private static IReplyMarkup GetButtons() { return new ReplyKeyboardMarkup { Keyboard = new List<List<KeyboardButton>> { new List<KeyboardButton>{ new KeyboardButton{ Text = "Хочу его "}, new KeyboardButton { Text = "Буду им"} } } }; } private static IReplyMarkup GetInLineBottons(string alo) { return new InlineKeyboardMarkup(new InlineKeyboardButton { Text = "*******", CallbackData = alo }); } } } Код using System; using System.Collections.Generic; using Telegram.Bot; using Telegram.Bot.Args; using Telegram.Bot.Types.ReplyMarkups; using System.IO; using System.Linq; using System.Threading; namespace GoOn { class Program { private static string token { get; set; } = "token"; private static TelegramBotClient client; static void Main(string[] args) { client = new TelegramBotClient(token); client.StartReceiving(); client.OnMessage += OnMessageHandler; Console.ReadLine(); client.StopReceiving(); } [Obsolete] private static async void OnMessageHandler(object sender, MessageEventArgs e) { var msg = e.Message; switch (msg.Text) { case "/start": var message = client.SendTextMessageAsync(msg.Chat.Id, "aga", replyMarkup: GetButtons()); break; case "Хочу приобрести товары": var picture = client.SendPhotoAsync(chatId: msg.Chat.Id, photo: "photo", replyMarkup: GetInLineBottons("Шо")).Result; break; } } private static IReplyMarkup GetButtons() { return new ReplyKeyboardMarkup { Keyboard = new List<List<KeyboardButton>> { new List<KeyboardButton>{ new KeyboardButton{ Text = "Хочу его "}, new KeyboardButton { Text = "Буду им"} } } }; } private static IReplyMarkup GetInLineBottons(string alo) { return new InlineKeyboardMarkup(new InlineKeyboardButton { Text = "*******", CallbackData = alo }); } } }
https://aftamat4ik.ru/pishem-bota-telegram-na-c/#toc-inline-8 нашёл решение. Кому интересно, можете посмотреть