From f85b65e440ae9e759e92d983da5c459652253b0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=8B=E5=88=80=E9=B1=BC?= <9903082+qdyovo@user.noreply.gitee.com> Date: Thu, 17 Oct 2024 14:40:11 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=88pref=EF=BC=9A=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E9=99=90=E5=88=B6=E6=97=B6=E9=95=BF=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/tools.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/tools.js b/apps/tools.js index 928a330..711e7f8 100644 --- a/apps/tools.js +++ b/apps/tools.js @@ -444,7 +444,7 @@ export class tools extends plugin { const dyCover = cover.url_list?.pop(); // logger.info(cover.url_list); dySendContent += `\n - ${ DIVIDING_LINE.replace('{}', '限制说明') }\n当前视频时长约:${ Math.trunc(dyDuration / 60) }分钟,\n大于管理员设置的最大时长 ${ durationThreshold / 60 } 分钟!`; + ${ DIVIDING_LINE.replace('{}', '限制说明') }\n当前视频时长约:${ Number.isInteger(dyDuration / 60) ? Math.trunc(dyDuration / 60) : (dyDuration / 60).toFixed(2) }分钟,\n大于管理员设置的最大时长 ${ Number.isInteger(durationThreshold / 60) ? Math.trunc(durationThreshold / 60) : (durationThreshold / 60).toFixed(2) } 分钟!`; e.reply([segment.image(dyCover), dySendContent]); // 如果开启评论的就调用 await this.douyinComment(e, douId, headers); @@ -814,7 +814,7 @@ export class tools extends plugin { // 限制视频解析 if (isLimitDuration) { const durationInMinutes = (curDuration / 60).toFixed(0); - biliInfo.push(`${ DIVIDING_LINE.replace('{}', '限制说明') }\n当前视频时长约:${ durationInMinutes }分钟,\n大于管理员设置的最大时长 ${ this.biliDuration / 60 } 分钟!`); + biliInfo.push(`${ DIVIDING_LINE.replace('{}', '限制说明') }\n当前视频时长约:${ durationInMinutes }分钟,\n大于管理员设置的最大时长 ${ Number.isInteger(this.biliDuration / 60) ? Math.trunc(this.biliDuration / 60) : (this.biliDuration / 60).toFixed(2) } 分钟!`); e.reply(biliInfo); return true; } else {