From 4e6e1ecca476193fd6e36a804539ae9db49dfa88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Thu, 30 Oct 2025 21:55:50 +0800 Subject: [PATCH] Comment out packet logging in initialization Disabled the console logging of all packets in both NCoreInitFramework and NCoreInitShell by commenting out the nativePacketHandler.onAll debug statements. This reduces console noise during normal operation. --- src/framework/napcat.ts | 6 +++--- src/shell/base.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/framework/napcat.ts b/src/framework/napcat.ts index 1f85a65d..e83ce425 100644 --- a/src/framework/napcat.ts +++ b/src/framework/napcat.ts @@ -39,9 +39,9 @@ export async function NCoreInitFramework( const basicInfoWrapper = new QQBasicInfoWrapper({ logger }); const wrapper = loadQQWrapper(basicInfoWrapper.getFullQQVersion()); const nativePacketHandler = new NativePacketHandler({ logger }); // 初始化 NativePacketHandler 用于后续使用 - nativePacketHandler.onAll((packet) => { - console.log('[Packet]', packet.uin, packet.cmd, packet.hex_data); - }); + // nativePacketHandler.onAll((packet) => { + // console.log('[Packet]', packet.uin, packet.cmd, packet.hex_data); + // }); await nativePacketHandler.init(basicInfoWrapper.getFullQQVersion()); // 在 init 之后注册监听器 diff --git a/src/shell/base.ts b/src/shell/base.ts index 1d0238fe..c6e66b55 100644 --- a/src/shell/base.ts +++ b/src/shell/base.ts @@ -322,9 +322,9 @@ export async function NCoreInitShell() { const wrapper = loadQQWrapper(basicInfoWrapper.getFullQQVersion()); const nativePacketHandler = new NativePacketHandler({ logger }); // 初始化 NativePacketHandler 用于后续使用 - nativePacketHandler.onAll((packet) => { - console.log('[Packet]', packet.uin, packet.cmd, packet.hex_data); - }); + // nativePacketHandler.onAll((packet) => { + // console.log('[Packet]', packet.uin, packet.cmd, packet.hex_data); + // }); await nativePacketHandler.init(basicInfoWrapper.getFullQQVersion()); const o3Service = wrapper.NodeIO3MiscService.get();