forked from MarseyWorld/MarseyWorld
dont allow #roll0
parent
5360605254
commit
2aee0c9507
|
@ -151,7 +151,7 @@ commands = {
|
||||||
"coinflip": COINFLIP_HEADS_OR_TAILS,
|
"coinflip": COINFLIP_HEADS_OR_TAILS,
|
||||||
}
|
}
|
||||||
|
|
||||||
command_regex = re.compile("(\s|^)#(fortune|factcheck|8ball|roll([0-9]+)|coinflip)", flags=re.A|re.I)
|
command_regex = re.compile("(\s|^)#(fortune|factcheck|8ball|roll([1-9][0-9]*)|coinflip)", flags=re.A|re.I)
|
||||||
|
|
||||||
def command_regex_matcher(match, upper=False):
|
def command_regex_matcher(match, upper=False):
|
||||||
if match.group(2) == 'coinflip' and random.random() < 0.01:
|
if match.group(2) == 'coinflip' and random.random() < 0.01:
|
||||||
|
|
Loading…
Reference in New Issue