public async Task ExecuteCallbackQueryAsync(long chatId, int messageId, string callbackQueryId, string payload) { var pageCount = int.Parse(payload); var pageModel = _sizePaginatorService.GetPage(pageCount); await _telegramBotClient.EditMessageTextAsync( chatId : chatId, messageId : messageId, text : pageModel.MessageText, parseMode : ParseMode.Markdown, replyMarkup : pageModel.Keyboard); }
private async Task EnterRegion(Message message) { var droplet = _storageService.Get <DropletRequest>(StorageKeys.NewDroplet); droplet.Region = _storageService.Get <string>(StorageKeys.RegionId); var sizes = await _digitalOceanClient.Sizes.GetAll(); _storageService.AddOrUpdate(StorageKeys.Sizes, sizes); _storageService.AddOrUpdate(StorageKeys.BotCurrentState, BotStateType.DropletCreateWaitingEnterSize); var paginator = _sizePaginatorService.GetPage(0); await _telegramBotClient.SendTextMessageAsync( chatId : message.Chat.Id, text : paginator.MessageText, parseMode : ParseMode.Markdown, replyMarkup : paginator.Keyboard); }