diff --git a/plugins/printerfact.py b/plugins/printerfact.py index dcab450..a68f637 100644 --- a/plugins/printerfact.py +++ b/plugins/printerfact.py @@ -9,12 +9,10 @@ kittenrex = re.compile(re.escape("kitten"), re.IGNORECASE) def php_fact(inp): return "http://phpsadness.com/sad/" + str(random.randint(0,53)) -@hook.regex("(.*) fact$") +@hook.regex("printer fact$") +@hook.command def printerfact(inp, say=None): - if len(inp.group(1).split()) != 1: - return "I cowardly refuse to look that up" - r = requests.get('https://catfacts-api.appspot.com/api/facts?number=1') fact = r.json()['facts'][0] - inp = inp.group(1) + inp = "printer" return kittenrex.sub("baby "+ inp, regex.sub(inp, fact)) diff --git a/plugins/shitposting.py b/plugins/shitposting.py index 2963500..eaa7e60 100644 --- a/plugins/shitposting.py +++ b/plugins/shitposting.py @@ -17,3 +17,7 @@ def rickrollProtector(inp): @hook.regex("[kK]-[lL]ine") def kline(inp): return "http://i.imgur.com/FQjQgyB.jpg" + +@hook.command +def botsnack(inp): + return ":D"