From dac81f776bc4e50aabbd13647926c7b14fc8b526 Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Wed, 30 Mar 2016 12:08:10 +0200 Subject: [PATCH] new alias for music, added ~revav (although unsatisfactory), closes #31 --- NadekoBot/Modules/Music.cs | 1 + NadekoBot/Modules/Searches.cs | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/NadekoBot/Modules/Music.cs b/NadekoBot/Modules/Music.cs index fd5ccd81..9c3041ad 100644 --- a/NadekoBot/Modules/Music.cs +++ b/NadekoBot/Modules/Music.cs @@ -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 => { diff --git a/NadekoBot/Modules/Searches.cs b/NadekoBot/Modules/Searches.cs index 3081be2f..8e29d878 100644 --- a/NadekoBot/Modules/Searches.cs +++ b/NadekoBot/Modules/Searches.cs @@ -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}"); + }); }); } }