From 8d678c3980896a5f39d613001d459dfc66242663 Mon Sep 17 00:00:00 2001 From: Jerryplusy Date: Mon, 6 Oct 2025 18:51:46 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E5=BD=A2=E5=8F=82?= =?UTF-8?q?=E7=BC=BA=E5=B0=91=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/auth.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/auth.js b/apps/auth.js index 1ba1bb0..e521c04 100644 --- a/apps/auth.js +++ b/apps/auth.js @@ -191,11 +191,11 @@ async function auth(e, group_id, user_id) { } catch (err) { logger.error('[crystelf-plugin] 请求手性碳验证API失败..', err); e.reply('手性碳api出现异常,已暂时切换至数字验证模式..'); - await numberAuth(e); + await numberAuth(e, key, groupCfg, user_id); } } else { await tools.sleep(500); - await numberAuth(e); + await numberAuth(e, key, groupCfg, user_id); } if (groupCfg.timeout > 60) { @@ -221,9 +221,12 @@ async function auth(e, group_id, user_id) { /** * 数字验证逻辑 * @param e + * @param key + * @param groupCfg + * @param user_id * @returns {Promise} */ -async function numberAuth(e) { +async function numberAuth(e, key, groupCfg, user_id) { const a = Math.floor(Math.random() * 100); const b = Math.floor(Math.random() * 100); const op = Math.random() > 0.5 ? '+' : '-';