fix: rm log error

This commit is contained in:
手瓜一十雪
2024-08-11 17:53:15 +08:00
parent 8eb79ec05b
commit 65343ed20f
6 changed files with 7 additions and 6 deletions

View File

@@ -176,7 +176,7 @@ export class RequestUtil {
req.on('error', (error) => {
reject(error);
console.error('Error during upload:', error);
console.log('Error during upload:', error);
});
const body = await RequestUtil.createFormData('WebKitFormBoundary7MA4YWxkTrZu0gW', filePath);

View File

@@ -43,7 +43,6 @@ export class NapCatCore {
this.context = context;
this.util = new this.context.wrapper.NodeQQNTWrapperUtil();
this.eventWrapper = new LegacyNTEventWrapper(context.wrapper, context.session);
this.initNapCatCoreListeners().then().catch(console.error);
this.ApiContext = {
FileApi: new NTQQFileApi(this.context, this),
SystemApi: new NTQQSystemApi(this.context, this),
@@ -61,6 +60,7 @@ export class NapCatCore {
if (!fs.existsSync(this.NapCatTempPath)) {
fs.mkdirSync(this.NapCatTempPath, { recursive: true });
}
this.initNapCatCoreListeners().then().catch(this.context.logger.logError);
}
getApiContext() {

View File

@@ -85,7 +85,7 @@ export class OB11ActiveWebSocketAdapter implements IOB11NetworkAdapter {
this.registerHeartBeat();
} catch (e) {
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);
}
}

View File

@@ -109,6 +109,7 @@ export async function NCoreInitShell() {
const qrcodePath = path.join(dataPath, 'qrcode.png');
qrcode.generate(qrcodeUrl, { small: true }, (res) => {
logger.logWarn([
'\n',
res,
'二维码解码URL: ' + qrcodeUrl,
'如果控制台二维码无法扫码可以复制解码url到二维码生成网站生成二维码再扫码也可以打开下方的二维码路径图片进行扫码。',