public async void Weather(MessageEventArgs messageEventArgs) { var weather = await WeatherHelper.GetWeather(User.GetLanguage); var inlineKeyboard = TemplateModelsBuilder.RefreshWeather(User.GetLanguage); SendMessageAsync(ChatId, weather, ParseMode.Markdown, replyMarkup: inlineKeyboard); }
//Refresh weather public async void RefreshWeather(CallbackQueryEventArgs callbackQueryEventArgs) { var args = ArgParser.ParseCallbackData(callbackQueryEventArgs.CallbackQuery.Data); bool isEdit = args.ContainsKey(Commands.IsEdit); var weather = await WeatherHelper.GetWeather(User.GetLanguage); var inlineKeyboard = TemplateModelsBuilder.RefreshWeather(User.GetLanguage); if (isEdit) { EditMessageTextAsync(ChatId, MessageId, weather, ParseMode.Markdown, replyMarkup: inlineKeyboard); } else { SendMessageAsync(ChatId, weather, ParseMode.Markdown, replyMarkup: inlineKeyboard); } }