From ca614f6ff71e846f59bdb963d73df8f12c2e2d9f Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Tue, 29 Mar 2016 14:27:57 +0200 Subject: [PATCH] added ~ym ~cn and ~rj joke commands, thanks to @tg44 , closees #105 --- NadekoBot/Modules/Searches.cs | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/NadekoBot/Modules/Searches.cs b/NadekoBot/Modules/Searches.cs index 6a709c16..8ffa3a69 100644 --- a/NadekoBot/Modules/Searches.cs +++ b/NadekoBot/Modules/Searches.cs @@ -330,7 +330,33 @@ $@"🌍 **Weather for** 【{obj["target"]}】 if (response == null) return; await e.Channel.SendMessage($"🐈 `{JObject.Parse(response)["facts"][0].ToString()}`"); + }); + cgb.CreateCommand(Prefix + "yomama") + .Alias(Prefix + "ym") + .Description("Shows a random joke from ") + .Do(async e => + { + var response = await SearchHelper.GetResponseStringAsync("http://api.yomomma.info/"); + await e.Channel.SendMessage(JObject.Parse(response)["joke"].ToString()); + }); + + cgb.CreateCommand(Prefix + "randjoke") + .Alias(Prefix + "rj") + .Description("Shows a random joke from ") + .Do(async e => + { + var response = await SearchHelper.GetResponseStringAsync("http://tambal.azurewebsites.net/joke/random"); + await e.Channel.SendMessage(JObject.Parse(response)["joke"].ToString()); + }); + + cgb.CreateCommand(Prefix + "chucknorris") + .Alias(Prefix + "cn") + .Description("Shows a random chucknorris joke from ") + .Do(async e => + { + var response = await SearchHelper.GetResponseStringAsync("http://api.icndb.com/jokes/random/"); + await e.Channel.SendMessage(JObject.Parse(response)["value"]["joke"].ToString()); }); }); }