Archived
1
0
Fork 0
This commit is contained in:
多羅狼 2024-03-23 23:05:26 +08:00 committed by GitHub
parent 26aa803b2e
commit cbe28a8cbf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -304,7 +304,7 @@ def generate_dice_message(msg, expr, dice_expr_list, dice_count, times, dc, use_
success_num = 0
fail_num = 0
output = msg.locale.t('dice.message.output')
if times > MAX_ROLL_TIMES:
if times <= 0 or times > MAX_ROLL_TIMES:
return DiceValueError(msg,
msg.locale.t("dice.message.error.value.N.out_of_range", max=MAX_ROLL_TIMES),
times).message