Support for embeds in .qsearch output
- Support for embeds in .qsearch output results
- Search can be case insensitive (changes made 011b951a29
)
- Output shows keyword in lowercase as it's easier to read (line 104)
- Minor syntax cleanups
This commit is contained in:
parent
011b951a29
commit
9344c1b498
@ -90,7 +90,18 @@ namespace NadekoBot.Modules.Utility
|
|||||||
if (keywordquote == null)
|
if (keywordquote == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
await Context.Channel.SendMessageAsync("💬 " + keyword + ": " + keywordquote.Text.SanitizeMentions());
|
CREmbed crembed;
|
||||||
|
if (CREmbed.TryParse(keywordquote.Text, out crembed))
|
||||||
|
{
|
||||||
|
try { await Context.Channel.EmbedAsync(crembed.ToEmbed(), crembed.PlainText ?? "").ConfigureAwait(false); }
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_log.Warn("Sending CREmbed failed");
|
||||||
|
_log.Warn(ex);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
await Context.Channel.SendMessageAsync("💬 " + keyword.toLowerInvariant(); + ": " + keywordquote.Text.SanitizeMentions());
|
||||||
}
|
}
|
||||||
|
|
||||||
[NadekoCommand, Usage, Description, Aliases]
|
[NadekoCommand, Usage, Description, Aliases]
|
||||||
|
Loading…
Reference in New Issue
Block a user