public async Task Execude(Update update, TelegramBotClient bot) { try { var quote = _quoteService.Get(); await bot.SendTextMessageAsync(update.Message.Chat.Id, String.Format($"{quote.QuoteText} Aвтор: {quote.QuoteAuthor}")); _log.Information(String.Format($"{quote.QuoteText} Aвтор: {quote.QuoteAuthor}")); } catch (WeatherException ex) { await bot.SendTextMessageAsync(update.Message.Chat.Id, "Ошибка получения цитаты"); _log.Information("Ошибка получения цитаты"); } }
public ActionResult <List <Quote> > Get() { return(_service.Get()); }
public ActionResult <List <Quote> > Get() => _quoteService.Get();