From ea4f24df4dcab210d74f0f513f1913cbd0717710 Mon Sep 17 00:00:00 2001 From: Zyy955 <1072411694@qq.com> Date: Sun, 15 Oct 2023 23:01:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=A4=9A=E5=96=B5=E5=B4=BDbo?= =?UTF-8?q?t=E6=A4=B0=E5=A5=B6=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/state.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/apps/state.js b/apps/state.js index 6f96f88..3ca6152 100644 --- a/apps/state.js +++ b/apps/state.js @@ -93,7 +93,19 @@ export class NewState extends plugin { // nodejs版本 const nodeVersion = process.version let BotStatus = "" - for (const i of e.msg.includes('pro') && Array.isArray(Bot.uin) ? Bot.uin : (Bot?.adapter?.[Bot?.uin] ? Bot.adapter : [e.self_id])) { + + /** bot列表 */ + let BotList = [e.self_id] + /** TRSS */ + if (e.msg.includes("pro") && Array.isArray(Bot?.uin)) { + BotList = Bot.uin + } + /** ws、qg、wx等多bot */ + else if (!Array.isArray(Bot?.uin) && Bot?.adapter && Bot.adapter.includes(Bot.uin)) { + BotList = Bot.adapter + } + + for (const i of BotList) { const bot = Bot[i] if (!bot?.uin) continue // 头像