Example #1
0
        public async Task LocalWeather(IDialogContext context, LuisResult result)
        {
            string city    = GetMyLocation();
            var    locInfo = await LocationInfo.GetLocationInfo(city);

            string msg = $"Current weather in {city} is {locInfo.weather[0].description}. It is now {locInfo.main.temp} C degrees.";

            await context.PostAsync(msg);

            context.Wait(MessageReceived);
        }
Example #2
0
        public async Task LocalWeather(IDialogContext context, LuisResult result)
        {
            string city = await GetMyLocationRegion();

            var locInfo = await LocationInfo.GetLocationInfo(city);

            string msg = $"Current weather in {city} is {locInfo.weather[0].description}. It is now {locInfo.main.temp} C degrees.";

            var translatedMsg = Translator.GetTransMsg(msg, OriginalLanguage);
            await context.PostAsync(translatedMsg);

            context.Wait(MessageReceived);
        }