Пример #1
0
    public async Task HandleAsync()
    {
        if (_args.Count == 0)
        {
            await _botService.SendMessageAsync("Please specify a city or region", _chatId);

            return;
        }

        var weatherApi = new WeatherApi(_clientFactory);
        var response   = await weatherApi.InvokeAsync(_args);

        if (string.IsNullOrEmpty(response))
        {
            await _botService.SendMessageAsync("Nothing \uD83D\uDE22", _chatId);

            return;
        }

        await _botService.SendMessageAsync(response, _chatId);
    }