mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-03-01 00:00:26 +00:00
fix: packet send/recv
This commit is contained in:
@@ -53,16 +53,7 @@ export class NTQQPacketApi {
|
||||
async sendPacket(cmd: string, data: string, rsp = false) {
|
||||
// wtfk tx
|
||||
// 校验失败和异常 可能返回undefined
|
||||
return new Promise<undefined | {
|
||||
type: string,//仅recv含有data
|
||||
trace_id: string,
|
||||
data: {
|
||||
trace_id: string,
|
||||
seq: number,
|
||||
hex_data: string,
|
||||
cmd: string
|
||||
}
|
||||
}>((resolve, reject) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (!this.isInit || !this.PacketClient?.isConnected) {
|
||||
this.core.context.logger.logError('PacketClient is not init');
|
||||
return undefined;
|
||||
|
||||
Reference in New Issue
Block a user