Пример #1
0
        public override async Task Execute(Message message, TelegramBotClient client)
        {
            var chatId = message.Chat.Id;
            await client.SendChatActionAsync(chatId, ChatAction.Typing);

            var currenciesInfo = service.GetCurrencies();
            await client.SendTextMessageAsync(chatId, currenciesInfo, ParseMode.Markdown);
        }
Пример #2
0
        public async Task <IActionResult> GetAllCurrencies()
        {
            try
            {
                List <CurrenciesDTO> currenciesList = await _currenciesService.GetCurrencies();

                return(Ok(currenciesList));
            }
            catch
            {
                return(BadRequest("Something went wrong"));
            }
        }