Update dice.py
This commit is contained in:
parent
cb5a50a058
commit
4e05964d62
1 changed files with 1 additions and 1 deletions
|
@ -141,7 +141,7 @@ class Dice(DiceItemBase):
|
|||
self.result = result
|
||||
|
||||
async def GenerateMessage(dices: str,times: int, dc:int):
|
||||
if re.search(r'[^0-9DKL\*]',dices):
|
||||
if re.search(r'[^0-9+-DKL\*]',dices):
|
||||
return DiceSyntaxError('骰子语句中存在无法识别的字符').message
|
||||
if times > MAX_ROLL_TIMES or times < 1:
|
||||
return DiceValueError('投骰次数不得小于 1 或 大于 {MAX_ROLL_TIMES}').message
|
||||
|
|
Reference in a new issue