From c73d394a783605c0538ae3c0cf0727715426dcce Mon Sep 17 00:00:00 2001 From: Dimitri Molenaars Date: Mon, 25 Mar 2013 21:52:58 +0100 Subject: [PATCH] [Dice]Fixed choice (finally) to have |, \ and / as delimiter. close #214 Signed-off-by: Dimitri Molenaars --- willie/modules/dice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/willie/modules/dice.py b/willie/modules/dice.py index ce8e5ec296..fcf808cfed 100644 --- a/willie/modules/dice.py +++ b/willie/modules/dice.py @@ -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']