Added exception to handle if 'd' is passed as the only valid part of the regex parsing
This commit is contained in:
parent
7d85fc1f55
commit
0323678d67
|
@ -97,7 +97,10 @@ class Core:
|
|||
try:
|
||||
dice = int(re.search("(\d*)d(\d*)", notation).group(1))
|
||||
num = int(re.search("(\d*)d(\d*)", notation).group(2))
|
||||
except AttributeError or ValueError:
|
||||
except AttributeError:
|
||||
await self.bot.say("Please provide the die notation in #d#!")
|
||||
return
|
||||
except ValueError:
|
||||
await self.bot.say("Please provide the die notation in #d#!")
|
||||
return
|
||||
if dice == '':
|
||||
|
|
Loading…
Reference in a new issue