ソースを参照

Merge pull request #11 from TBTerra/master

fixed 'cant roll a zero sided dice' error
tags/v1.7.1
Roxie Gibson 6年前
コミット
1d97a8e9c1
コミッターのメールアドレスに関連付けられたアカウントが存在しません
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

読み込み中…
キャンセル
保存