Modified the regex to match 0 or more times of a number
This commit is contained in:
parent
0c0e4ea52c
commit
38938cdbcc
|
@ -93,8 +93,8 @@ class Core:
|
||||||
"""Rolls a die based on the notation given
|
"""Rolls a die based on the notation given
|
||||||
Format should be #d#"""
|
Format should be #d#"""
|
||||||
try:
|
try:
|
||||||
dice = re.search("(\d?)d(\d?)",notation).group(1)
|
dice = re.search("(\d*)d(\d*)",notation).group(1)
|
||||||
num = re.search("(\d?)d(\d?)",notation).group(2)
|
num = re.search("(\d*)d(\d*)",notation).group(2)
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
await self.bot.say("Please provide the die notation in #d#!")
|
await self.bot.say("Please provide the die notation in #d#!")
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue