Archived
1
0
Fork 0

Update dice.py

This commit is contained in:
Nattiden 2023-02-25 22:31:46 +08:00 committed by GitHub
parent cb5a50a058
commit 4e05964d62
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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