瀏覽代碼

fixed 'cant roll a zero sided dice' error

tags/v1.7.1^2
Terra Barber 6 年之前
父節點
當前提交
54ae644985
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. +1
    -1
      roxbot/cogs/fun.py

+ 1
- 1
roxbot/cogs/fun.py 查看文件

@@ -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…
取消
儲存