mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
fix: rm log error
This commit is contained in:
parent
412b8473fe
commit
32c3aa7979
@ -11,7 +11,7 @@ try {
|
|||||||
|
|
||||||
// 验证 targetVersion 格式
|
// 验证 targetVersion 格式
|
||||||
if (!targetVersion || typeof targetVersion !== 'string') {
|
if (!targetVersion || typeof targetVersion !== 'string') {
|
||||||
console.error("[NapCat] [CheckVersion] 目标版本格式不正确或未设置!");
|
console.log("[NapCat] [CheckVersion] 目标版本格式不正确或未设置!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,5 +38,5 @@ try {
|
|||||||
writeScriptToFile(safeScriptContent);
|
writeScriptToFile(safeScriptContent);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("[NapCat] [CheckVersion] 检测过程中发生错误:", error);
|
console.log("[NapCat] [CheckVersion] 检测过程中发生错误:", error);
|
||||||
}
|
}
|
@ -176,7 +176,7 @@ export class RequestUtil {
|
|||||||
|
|
||||||
req.on('error', (error) => {
|
req.on('error', (error) => {
|
||||||
reject(error);
|
reject(error);
|
||||||
console.error('Error during upload:', error);
|
console.log('Error during upload:', error);
|
||||||
});
|
});
|
||||||
|
|
||||||
const body = await RequestUtil.createFormData('WebKitFormBoundary7MA4YWxkTrZu0gW', filePath);
|
const body = await RequestUtil.createFormData('WebKitFormBoundary7MA4YWxkTrZu0gW', filePath);
|
||||||
|
@ -43,7 +43,6 @@ export class NapCatCore {
|
|||||||
this.context = context;
|
this.context = context;
|
||||||
this.util = new this.context.wrapper.NodeQQNTWrapperUtil();
|
this.util = new this.context.wrapper.NodeQQNTWrapperUtil();
|
||||||
this.eventWrapper = new LegacyNTEventWrapper(context.wrapper, context.session);
|
this.eventWrapper = new LegacyNTEventWrapper(context.wrapper, context.session);
|
||||||
this.initNapCatCoreListeners().then().catch(console.error);
|
|
||||||
this.ApiContext = {
|
this.ApiContext = {
|
||||||
FileApi: new NTQQFileApi(this.context, this),
|
FileApi: new NTQQFileApi(this.context, this),
|
||||||
SystemApi: new NTQQSystemApi(this.context, this),
|
SystemApi: new NTQQSystemApi(this.context, this),
|
||||||
@ -61,6 +60,7 @@ export class NapCatCore {
|
|||||||
if (!fs.existsSync(this.NapCatTempPath)) {
|
if (!fs.existsSync(this.NapCatTempPath)) {
|
||||||
fs.mkdirSync(this.NapCatTempPath, { recursive: true });
|
fs.mkdirSync(this.NapCatTempPath, { recursive: true });
|
||||||
}
|
}
|
||||||
|
this.initNapCatCoreListeners().then().catch(this.context.logger.logError);
|
||||||
}
|
}
|
||||||
|
|
||||||
getApiContext() {
|
getApiContext() {
|
||||||
|
@ -85,7 +85,7 @@ export class OB11ActiveWebSocketAdapter implements IOB11NetworkAdapter {
|
|||||||
this.registerHeartBeat();
|
this.registerHeartBeat();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.connection = null;
|
this.connection = null;
|
||||||
console.error('Failed to connect to the server, retrying in 5 seconds...');
|
console.log('Failed to connect to the server, retrying in 5 seconds...');
|
||||||
await sleep(5000);
|
await sleep(5000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -109,6 +109,7 @@ export async function NCoreInitShell() {
|
|||||||
const qrcodePath = path.join(dataPath, 'qrcode.png');
|
const qrcodePath = path.join(dataPath, 'qrcode.png');
|
||||||
qrcode.generate(qrcodeUrl, { small: true }, (res) => {
|
qrcode.generate(qrcodeUrl, { small: true }, (res) => {
|
||||||
logger.logWarn([
|
logger.logWarn([
|
||||||
|
'\n',
|
||||||
res,
|
res,
|
||||||
'二维码解码URL: ' + qrcodeUrl,
|
'二维码解码URL: ' + qrcodeUrl,
|
||||||
'如果控制台二维码无法扫码,可以复制解码url到二维码生成网站生成二维码再扫码,也可以打开下方的二维码路径图片进行扫码。',
|
'如果控制台二维码无法扫码,可以复制解码url到二维码生成网站生成二维码再扫码,也可以打开下方的二维码路径图片进行扫码。',
|
||||||
|
@ -283,7 +283,7 @@
|
|||||||
|
|
||||||
function generateQrCode(data, canvas) {
|
function generateQrCode(data, canvas) {
|
||||||
QRCode.toCanvas(canvas, data, function (error) {
|
QRCode.toCanvas(canvas, data, function (error) {
|
||||||
if (error) console.error(error);
|
if (error) console.log(error);
|
||||||
console.log('QR Code generated!');
|
console.log('QR Code generated!');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user