From fd26a9c698c8290275742976d34452dc46951aec 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: Mon, 19 Aug 2024 18:53:47 +0800 Subject: [PATCH] fix --- src/core/core.ts | 2 +- src/shell/napcat.ts | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/core/core.ts b/src/core/core.ts index 095794b6..caff4b19 100644 --- a/src/core/core.ts +++ b/src/core/core.ts @@ -79,7 +79,7 @@ export class NapCatCore { } get dataPath(): string { - let result = this.util.getNTUserDataInfoConfig(); + let result = this.context.wrapper.NodeQQNTWrapperUtil.getNTUserDataInfoConfig(); if (!result) { result = path.resolve(os.homedir(), './.config/QQ'); fs.mkdirSync(result, { recursive: true }); diff --git a/src/shell/napcat.ts b/src/shell/napcat.ts index 129d9e6b..886d5f88 100644 --- a/src/shell/napcat.ts +++ b/src/shell/napcat.ts @@ -188,8 +188,8 @@ export async function NCoreInitShell() { logger.log('没有 -q 指令指定快速登录,将使用二维码登录方式'); if (historyLoginList.length > 0) { logger.log(`可用于快速登录的 QQ:\n${historyLoginList - .map((u, index) => `${index + 1}. ${u.uin} ${u.nickName}`) - .join('\n') + .map((u, index) => `${index + 1}. ${u.uin} ${u.nickName}`) + .join('\n') }`); } loginService.getQRCodePicture(); @@ -218,9 +218,9 @@ export async function NCoreInitShell() { }; session.init( sessionConfig, - new wrapper.NodeIDependsAdapter(new DependsAdapter()), - new wrapper.NodeIDispatcherAdapter(new DispatcherAdapter()), - new wrapper.NodeIKernelSessionListener(sessionListener), + new DependsAdapter() as any, + new DispatcherAdapter() as any, + sessionListener as any, ); try { session.startNT(0);