mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-01-17 13:50:36 +00:00
fix: 支持registerCallback
This commit is contained in:
parent
9372e83bd8
commit
66e1b1662f
@ -1,7 +1,7 @@
|
|||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
|
||||||
async function initializeNapCat(session, loginService) {
|
async function initializeNapCat(session, loginService, registerCallback) {
|
||||||
//const logFile = path.join(currentPath, 'napcat.log');
|
//const logFile = path.join(currentPath, 'napcat.log');
|
||||||
|
|
||||||
console.log('[NapCat] [Info] 开始初始化NapCat');
|
console.log('[NapCat] [Info] 开始初始化NapCat');
|
||||||
@ -13,7 +13,7 @@ async function initializeNapCat(session, loginService) {
|
|||||||
try {
|
try {
|
||||||
const currentPath = path.dirname(__filename);
|
const currentPath = path.dirname(__filename);
|
||||||
const { NCoreInitFramework } = await import('file://' + path.join(currentPath, './napcat.mjs'));
|
const { NCoreInitFramework } = await import('file://' + path.join(currentPath, './napcat.mjs'));
|
||||||
await NCoreInitFramework(session, loginService, (callback) => { callback(); });
|
await NCoreInitFramework(session, loginService, (callback) => { registerCallback(callback) });
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log('[NapCat] [Error] 初始化NapCat', error);
|
console.log('[NapCat] [Error] 初始化NapCat', error);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user