1
0
Fork 0
mirror of synced 2024-05-19 20:12:30 +12:00

Modified the regex to match 0 or more times of a number

This commit is contained in:
Phxntxm 2016-07-10 09:05:52 -05:00
parent 0c0e4ea52c
commit 38938cdbcc

View file

@ -93,8 +93,8 @@ class Core:
"""Rolls a die based on the notation given
Format should be #d#"""
try:
dice = re.search("(\d?)d(\d?)",notation).group(1)
num = re.search("(\d?)d(\d?)",notation).group(2)
dice = re.search("(\d*)d(\d*)",notation).group(1)
num = re.search("(\d*)d(\d*)",notation).group(2)
except AttributeError:
await self.bot.say("Please provide the die notation in #d#!")
return