fix .choose bugs
parent
72135ea0ed
commit
9ffdc28102
|
@ -11,12 +11,11 @@ def choose(phenny, input):
|
|||
origterm = input.groups()[1]
|
||||
if not origterm:
|
||||
return phenny.say(".choose <red> <blue> - 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'(.*)')
|
||||
|
|
Loading…
Reference in New Issue