Пример #1
0
        public async Task GetWeather(string name)
        {
            if (name == "set")
            {
                await SetLocation();
            }
            else
            {
                WeatherModel wm = await WeatherProcessor.GetWeatherDataName(name);

                if (wm == null)
                {
                    throw new NoLocationFoundException();
                }
                else
                {
                    wm.FixMapping();
                    await WeatherEmbedBuilder.DisplayWeather(wm, Context as SocketCommandContext);
                }
            }
        }