Skip to content

Commit

Permalink
[Dice]Fixed choice (finally) to have |, \ and / as delimiter.
Browse files Browse the repository at this point in the history
close #214

Signed-off-by: Dimitri Molenaars <Tyrope@TyRope.nl>
  • Loading branch information
tyrope committed Mar 25, 2013
1 parent 30e3b56 commit c73d394
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion willie/modules/dice.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def choose(willie, trigger):
"""
if not trigger.group(2):
return willie.reply('I\'d choose an option, but you didn\'t give me any.')
choices = trigger.group(2).split('|')
choices = re.split('[\|\\\\\/]', trigger.group(2))
pick = choice(choices)
return willie.reply('Your options: %s. My choice: %s' % (', '.join(choices), pick))
choose.commands = ['choice', 'ch', 'choose']
Expand Down

0 comments on commit c73d394

Please sign in to comment.