Revert "Google Search fixed"

This reverts commit 0ef9e356e5.
This commit is contained in:
samvaio 2016-12-29 12:04:12 +05:30
parent 0ef9e356e5
commit c4354112c6

View File

@ -266,7 +266,7 @@ namespace NadekoBot.Modules.Searches
var embed = new EmbedBuilder() var embed = new EmbedBuilder()
.WithOkColor() .WithOkColor()
.WithAuthor(eab => eab.WithName("Search For: " + terms.TrimTo(50)) .WithAuthor(eab => eab.WithName("Search For: " + terms)
.WithUrl(fullQueryLink) .WithUrl(fullQueryLink)
.WithIconUrl("http://i.imgur.com/G46fm8J.png")) .WithIconUrl("http://i.imgur.com/G46fm8J.png"))
.WithTitle(umsg.Author.Mention) .WithTitle(umsg.Author.Mention)
@ -274,8 +274,7 @@ namespace NadekoBot.Modules.Searches
string desc = ""; string desc = "";
foreach (GoogleSearchResult res in results) foreach (GoogleSearchResult res in results)
{ {
var shortlinks = await NadekoBot.Google.ShortenUrl(res.Link).ConfigureAwait(false); desc += $"[{Format.Bold(res.Title)}]({res.Link})\n{res.Text}\n\n";
desc += $"[{Format.Bold(res.Title.TrimTo(70))}]({shortlinks})\n{res.Text.TrimTo(150)}\n\n";
} }
await channel.EmbedAsync(embed.WithDescription(desc).Build()).ConfigureAwait(false); await channel.EmbedAsync(embed.WithDescription(desc).Build()).ConfigureAwait(false);
} }