From 46ba0694bb67fb40c7f33675ed2e3b4dea1d9738 Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Mon, 9 Nov 2015 12:38:53 -0800 Subject: [PATCH] fix printer fact regex --- plugins/printerfact.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/printerfact.py b/plugins/printerfact.py index a68f637..97dc3e6 100644 --- a/plugins/printerfact.py +++ b/plugins/printerfact.py @@ -4,12 +4,13 @@ import requests, re, random regex = re.compile(re.escape("cat"), re.IGNORECASE) kittenrex = re.compile(re.escape("kitten"), re.IGNORECASE) +preggorex = re.compile(re.escape("pregmant"), re.IGNORECASE) @hook.regex("PHP sadness$") def php_fact(inp): return "http://phpsadness.com/sad/" + str(random.randint(0,53)) -@hook.regex("printer fact$") +@hook.regex("^printer fact$") @hook.command def printerfact(inp, say=None): r = requests.get('https://catfacts-api.appspot.com/api/facts?number=1')