Update dice.py
This commit is contained in:
parent
fca179556d
commit
af6eb86577
1 changed files with 9 additions and 7 deletions
|
@ -142,14 +142,16 @@ class Dice(DiceItemBase):
|
||||||
# 公用加法
|
# 公用加法
|
||||||
length = len(dice_results)
|
length = len(dice_results)
|
||||||
if length > 1:
|
if length > 1:
|
||||||
output += '=['
|
output_buffer += '=['
|
||||||
for i in range(length):
|
for i in range(length):
|
||||||
result += dice_results[i]
|
result += dice_results[i]
|
||||||
if length <= MAX_OUTPUT_CNT: # 显示数据含100
|
output_buffer += str(dice_results[i])
|
||||||
output += str(dice_results[i])
|
|
||||||
if i < length - 1:
|
if i < length - 1:
|
||||||
output += '+'
|
output_buffer += '+'
|
||||||
output += ']'
|
output_buffer += ']'
|
||||||
|
if self.count > MAX_OUTPUT_CNT: # 显示数据含100
|
||||||
|
output_buffer = '=' + msg.locale.t("dice.message.output.too_long", length=self.count)
|
||||||
|
output += output_buffer
|
||||||
else:
|
else:
|
||||||
result = dice_results[0]
|
result = dice_results[0]
|
||||||
output += f'={result}'
|
output += f'={result}'
|
||||||
|
|
Reference in a new issue