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

Added exception to handle if 'd' is passed as the only valid part of the regex parsing

This commit is contained in:
Phxntxm 2016-07-11 13:18:57 -05:00
parent 7d85fc1f55
commit 0323678d67

View file

@ -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 == '':