whoops accidentally removed Google.
This commit is contained in:
parent
7ad43e8345
commit
c50e192dbe
@ -194,6 +194,20 @@ $@"🌍 **Weather for** 【{obj["target"]}】
|
|||||||
await msg.Channel.SendMessageAsync(await NadekoBot.Google.ShortenUrl(arg).ConfigureAwait(false));
|
await msg.Channel.SendMessageAsync(await NadekoBot.Google.ShortenUrl(arg).ConfigureAwait(false));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[NadekoCommand, Usage, Description, Aliases]
|
||||||
|
[RequireContext(ContextType.Guild)]
|
||||||
|
public async Task Google(IUserMessage umsg, [Remainder] string terms = null)
|
||||||
|
{
|
||||||
|
var channel = (ITextChannel)umsg.Channel;
|
||||||
|
|
||||||
|
|
||||||
|
terms = terms?.Trim();
|
||||||
|
if (string.IsNullOrWhiteSpace(terms))
|
||||||
|
return;
|
||||||
|
await channel.SendMessageAsync($"https://google.com/search?q={ WebUtility.UrlEncode(terms).Replace(' ', '+') }")
|
||||||
|
.ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
|
||||||
[NadekoCommand, Usage, Description, Aliases]
|
[NadekoCommand, Usage, Description, Aliases]
|
||||||
[RequireContext(ContextType.Guild)]
|
[RequireContext(ContextType.Guild)]
|
||||||
public async Task MagicTheGathering(IUserMessage umsg, [Remainder] string name = null)
|
public async Task MagicTheGathering(IUserMessage umsg, [Remainder] string name = null)
|
||||||
|
Loading…
Reference in New Issue
Block a user