new alias for music, added ~revav (although unsatisfactory), closes #31
This commit is contained in:
parent
d1fb241cb6
commit
dac81f776b
@ -70,6 +70,7 @@ namespace NadekoBot.Modules
|
||||
|
||||
cgb.CreateCommand("n")
|
||||
.Alias("next")
|
||||
.Alias("skip")
|
||||
.Description("Goes to the next song in the queue.")
|
||||
.Do(e =>
|
||||
{
|
||||
|
@ -357,6 +357,23 @@ $@"🌍 **Weather for** 【{obj["target"]}】
|
||||
var response = await SearchHelper.GetResponseStringAsync("http://api.icndb.com/jokes/random/");
|
||||
await e.Channel.SendMessage("`" + JObject.Parse(response)["value"]["joke"].ToString() + "` 😆");
|
||||
});
|
||||
|
||||
cgb.CreateCommand(Prefix + "revav")
|
||||
.Description("Returns a google reverse image search for someone's avatar.")
|
||||
.Parameter("user", ParameterType.Unparsed)
|
||||
.Do(async e =>
|
||||
{
|
||||
var usrStr = e.GetArg("user")?.Trim();
|
||||
|
||||
if (string.IsNullOrWhiteSpace(usrStr))
|
||||
return;
|
||||
|
||||
var usr = e.Server.FindUsers(usrStr).FirstOrDefault();
|
||||
|
||||
if (usr == null || string.IsNullOrWhiteSpace(usr.AvatarUrl))
|
||||
return;
|
||||
await e.Channel.SendMessage($"https://images.google.com/searchbyimage?image_url={usr.AvatarUrl}");
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user