public async void ShowServices(TelegramClientInfo clientInfo, List <List <BotButtonInfo> > inlineButtonInfos, string message = null) { try { clientInfo.CurrentServiceName = null; InlineKeyboardMarkup replyMarkup = new InlineKeyboardMarkup(BotButtonsToKeyboardButtons(inlineButtonInfos)); await _botClient.SendTextMessageAsync( chatId : clientInfo.Message.Chat, text : message == null?CurrentBotStructureInfo.GetServicesGeneratedText(clientInfo) : message, replyMarkup : replyMarkup ); } catch (Exception ex) { Console.WriteLine(ex); } }
private async Task ShowServices(TelegramClientInfo clientInfo, MessageEventArgs e) { string text = CurrentBotStructureInfo.GetServicesGeneratedText(clientInfo); clientInfo.CurrentServiceName = null; List <List <BotButtonInfo> > buttons = GetListOfServicesButtons(clientInfo); CurrentBotStructureInfo.OnButtonsGenerating(buttons, BotLevelType.Services, null, null, clientInfo); ReplyKeyboardMarkup replyMarkup = new ReplyKeyboardMarkup { Keyboard = BotButtonsToKeyboardButtons(buttons, clientInfo) }; await _botClient.SendTextMessageAsync( chatId : e.Message.Chat, text : text, replyMarkup : replyMarkup ); }
public async void ShowServices(TelegramClientInfo clientInfo, string message = null) { try { clientInfo.CurrentServiceName = null; List <List <BotButtonInfo> > buttons = GetListOfServicesButtons(clientInfo); CurrentBotStructureInfo.OnButtonsGenerating(buttons, BotLevelType.Services, null, null, clientInfo); ReplyKeyboardMarkup replyMarkup = new ReplyKeyboardMarkup { Keyboard = BotButtonsToKeyboardButtons(buttons, clientInfo) }; await _botClient.SendTextMessageAsync( chatId : clientInfo.Message.Chat, text : message == null?CurrentBotStructureInfo.GetServicesGeneratedText(clientInfo) : message, replyMarkup : replyMarkup ); } catch (Exception ex) { Console.WriteLine(ex); } }