From b90bf3ac8a137f534795dd1bb8ebc9fa54425700 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Thu, 16 Mar 2017 09:12:15 +0100 Subject: [PATCH] fixed ~we when multiple weathers are received --- src/NadekoBot/Modules/Searches/Searches.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/NadekoBot/Modules/Searches/Searches.cs b/src/NadekoBot/Modules/Searches/Searches.cs index 72969f49..88d688c9 100644 --- a/src/NadekoBot/Modules/Searches/Searches.cs +++ b/src/NadekoBot/Modules/Searches/Searches.cs @@ -51,7 +51,7 @@ namespace NadekoBot.Modules.Searches .AddField(fb => fb.WithName("🌄 " + Format.Bold(GetText("sunrise"))).WithValue($"{data.sys.sunrise.ToUnixTimestamp():HH:mm} UTC").WithIsInline(true)) .AddField(fb => fb.WithName("🌇 " + Format.Bold(GetText("sunset"))).WithValue($"{data.sys.sunset.ToUnixTimestamp():HH:mm} UTC").WithIsInline(true)) .WithOkColor() - .WithFooter(efb => efb.WithText("Powered by openweathermap.org").WithIconUrl($"http://openweathermap.org/img/w/{string.Join(", ", data.weather.Select(w => w.icon))}.png")); + .WithFooter(efb => efb.WithText("Powered by openweathermap.org").WithIconUrl($"http://openweathermap.org/img/w/{data.weather[0].icon}.png")); await Context.Channel.EmbedAsync(embed).ConfigureAwait(false); } @@ -217,7 +217,7 @@ namespace NadekoBot.Modules.Searches if (string.IsNullOrWhiteSpace(ffs)) return; - await Context.Channel.SendConfirmAsync(await NadekoBot.Google.ShortenUrl($"")) + await Context.Channel.SendConfirmAsync("<" + await NadekoBot.Google.ShortenUrl($"http://lmgtfy.com/?q={ Uri.EscapeUriString(ffs) }") + ">") .ConfigureAwait(false); }