Browse Source

Merge pull request #11 from TBTerra/master

fixed 'cant roll a zero sided dice' error
tags/v1.7.1
Roxie Gibson 6 years ago
parent
commit
1d97a8e9c1
No account linked to committer's email address
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      roxbot/cogs/fun.py

+ 1
- 1
roxbot/cogs/fun.py View File

@@ -67,7 +67,7 @@ class Fun:
temp[0] = 1 if item[0] == '' else -1#if theres a - at the beginning of the sub expression there needs to be a -1 multiplier applied to the sub expression total
if 'd' in item[1]:#if its a dice/set of dice rather than a number
temp[2] = int(item[3])
if temp[3] == 0:#safety check for things like 2d0 + 1 (0 sided dice)
if temp[2] == 0:#safety check for things like 2d0 + 1 (0 sided dice)
return await ctx.send("cant roll a zero sided dice")
if item[2] == '':#if its just a dY rather than an XdY
temp[1] = 1

Loading…
Cancel
Save