From 893387951a5ff2b0e280bb6872da48a98707a650 Mon Sep 17 00:00:00 2001 From: Jerry Date: Mon, 28 Apr 2025 17:53:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/keep.js | 0 lib/core/botControl.js | 11 ++++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 apps/keep.js diff --git a/apps/keep.js b/apps/keep.js deleted file mode 100644 index e69de29..0000000 diff --git a/lib/core/botControl.js b/lib/core/botControl.js index 03020bf..41d43e2 100644 --- a/lib/core/botControl.js +++ b/lib/core/botControl.js @@ -1,8 +1,9 @@ import wsClient from '../../models/ws/wsClient.js'; +import configControl from '../config/configControl.js'; const botControl = { async reportBots() { - const bots = []; + const bots = [{ client: configControl.get('coreConfig').wsClientId }]; for (const bot of Object.values(Bot)) { if (!bot || !bot.uin) continue; @@ -11,6 +12,7 @@ const botControl = { uin: bot.uin, groups: [], }; + let groupsMap = bot.gl; if (groupsMap) { for (const [groupId, groupInfo] of groupsMap) { @@ -20,13 +22,16 @@ const botControl = { }); } } + bots.push(botInfo); } - return await wsClient.sendMessage({ + const message = { type: 'reportBots', data: bots, - }); + }; + + return await wsClient.sendMessage(message); }, };