diff --git a/modules/choose.py b/modules/choose.py index b079346..63570ba 100644 --- a/modules/choose.py +++ b/modules/choose.py @@ -11,12 +11,11 @@ def choose(phenny, input): origterm = input.groups()[1] if not origterm: return phenny.say(".choose - for when you just can't decide") - origterm = origterm - c = re.findall(r'([^,]+)', input) + c = re.findall(r'([^,]+)', origterm) if len(c) == 1: - c = re.findall(r'(\S+)', input) + c = re.findall(r'(\S+)', origterm) if len(c) == 1: - return phenny.reply("%s" % (c)) + return phenny.reply("%s" % (c.strip())) fate = random.choice(c).strip() return phenny.reply("%s" % (fate)) choose.rule = (['choose'], r'(.*)')