From 5b8b40cc16b4d47da9324a3b6a25bcbf43e6d746 Mon Sep 17 00:00:00 2001 From: yoimiya-kokomi <592981798@qq.com> Date: Fri, 8 Jul 2022 08:04:47 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=B7=B1=E6=B8=8A=E6=8E=92?= =?UTF-8?q?=E5=90=8D=E7=9A=84=E6=96=87=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/stat.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/stat.js b/apps/stat.js index 4ba510d8..34d2dce1 100644 --- a/apps/stat.js +++ b/apps/stat.js @@ -422,9 +422,9 @@ export async function uploadData(e) { let char = Character.get(ds.avatarId); title = `${title}:${char.name} ${(ds.value / 10000).toFixed(1)}W,`; if (ds.percent < 0.2) { - msg.push(`${title}少于${(100 - ds.percent * 100).toFixed(1)}%的用户`) + msg.push(`${title}少于${(Math.max(0.1, 100 - ds.percent * 100)).toFixed(1)}%的${char.name}用户`) } else { - msg.push(`${title}超过${(ds.percent * 100).toFixed(1)}%的用户`) + msg.push(`${title}超过${(Math.min(99.9, ds.percent * 100)).toFixed(1)}%的${char.name}用户`) } } msg.push("本次深渊排行:");