From 1148d24ef5d8beae92044d01543c176392dd8fcf Mon Sep 17 00:00:00 2001 From: zhiyu1998 Date: Thu, 13 Apr 2023 11:40:34 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=88=20perf:=20=E7=AE=80=E5=8C=96?= =?UTF-8?q?=E9=99=90=E6=B5=81=E7=AE=97=E6=B3=95=20&=20=E2=9C=A8=20feat:=20?= =?UTF-8?q?=E5=A2=9E=E5=BC=BA=E5=93=94=E5=93=A9=E5=93=94=E5=93=A9=E8=A7=A3?= =?UTF-8?q?=E6=9E=90=E5=81=A5=E5=A3=AE=E6=80=A7=EF=BC=8C=E9=98=B2=E6=AD=A2?= =?UTF-8?q?=E9=AB=98=E5=B9=B6=E5=8F=91=E7=8E=AF=E5=A2=83=E4=B8=8B=E8=A7=A3?= =?UTF-8?q?=E6=9E=90=E8=87=B4=E4=BD=BF=E6=9C=8D=E5=8A=A1=E5=99=A8=E5=AE=95?= =?UTF-8?q?=E6=9C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/tools.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/tools.js b/apps/tools.js index d9cdf52..4d45f1b 100644 --- a/apps/tools.js +++ b/apps/tools.js @@ -327,8 +327,8 @@ export class tools extends plugin { // bilibi解析 async bili(e) { - await this.limitUserUse(e, async () => { - await this.biliCore(e); + await this.limitUserUse(e, () => { + this.biliCore(e); }); } async biliCore(e) { @@ -1217,7 +1217,7 @@ export class tools extends plugin { } /** - * 限制用户调用(默认1分钟1次) + * 限制用户调用 * @param e * @param func * @return {Promise} @@ -1226,7 +1226,7 @@ export class tools extends plugin { if (tools.#tokenBucket.consume(e.user_id, 1)) { await func(); } else { - logger.warn(`解析被限制使用`, true); + logger.warn(`解析被限制使用`); } }