parent
0ef9e356e5
commit
c4354112c6
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user