mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
feat: 去掉开发输出
This commit is contained in:
parent
393815b11e
commit
591ab1b1df
@ -90,7 +90,7 @@ export abstract class PacketClient {
|
|||||||
const trace_id = (this.randText(4) + md5 + data).slice(0, data.length / 2);
|
const trace_id = (this.randText(4) + md5 + data).slice(0, data.length / 2);
|
||||||
|
|
||||||
this.sendCommand(cmd, data, trace_id, rsp, 20000, async () => {
|
this.sendCommand(cmd, data, trace_id, rsp, 20000, async () => {
|
||||||
console.log('sendPacket:', cmd, data, trace_id);
|
//console.log('sendPacket:', cmd, data, trace_id);
|
||||||
await this.napCatCore.context.session.getMsgService().sendSsoCmdReqByContend(cmd, trace_id);
|
await this.napCatCore.context.session.getMsgService().sendSsoCmdReqByContend(cmd, trace_id);
|
||||||
}).then((res) => resolve(res)).catch((e: Error) => reject(e));
|
}).then((res) => resolve(res)).catch((e: Error) => reject(e));
|
||||||
});
|
});
|
||||||
|
@ -63,14 +63,14 @@ export class NativePacketClient extends PacketClient {
|
|||||||
// } else {
|
// } else {
|
||||||
// this.logger.logError(`Callback not found for hex_data: ${hex_data}`);
|
// this.logger.logError(`Callback not found for hex_data: ${hex_data}`);
|
||||||
// }
|
// }
|
||||||
console.log('type:', type, 'cmd:', cmd, 'trace_id:', trace_id);
|
//console.log('type:', type, 'cmd:', cmd, 'trace_id:', trace_id);
|
||||||
});
|
});
|
||||||
this.isAvailable = true;
|
this.isAvailable = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
sendCommandImpl(cmd: string, data: string, trace_id: string): void {
|
sendCommandImpl(cmd: string, data: string, trace_id: string): void {
|
||||||
const trace_id_md5 = createHash('md5').update(trace_id).digest('hex');
|
const trace_id_md5 = createHash('md5').update(trace_id).digest('hex');
|
||||||
console.log('sendCommandImpl:', cmd, data, trace_id_md5);
|
//console.log('sendCommandImpl:', cmd, data, trace_id_md5);
|
||||||
this.MoeHooExport.exports.SendPacket?.(cmd, data, trace_id_md5);
|
this.MoeHooExport.exports.SendPacket?.(cmd, data, trace_id_md5);
|
||||||
this.cb.get(trace_id_md5 + 'send')?.({ seq: 0, cmd, hex_data: '' });
|
this.cb.get(trace_id_md5 + 'send')?.({ seq: 0, cmd, hex_data: '' });
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user