new alias for music, added ~revav (although unsatisfactory), closes #31

This commit is contained in:
Master Kwoth 2016-03-30 12:08:10 +02:00
parent d1fb241cb6
commit dac81f776b
2 changed files with 18 additions and 0 deletions

View File

@ -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 =>
{

View File

@ -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}");
});
});
}
}