refactor: apiInit Refactor

This commit is contained in:
手瓜一十雪 committed 2024-11-14 10:52:03 +08:00
1 parent 56fac6c725
commit b9cadb20f7
4 files changed
+21 -13

No files matched your search

+3 -2
View File
@@ -26,14 +26,15 @@ export class NTQQPacketApi {
this.context = context;
this.core = core;
this.logger = core.context.logger;
this.InitSendPacket(this.context.basicInfoWrapper.getFullQQVesion())
}
async initApi() {
await this.InitSendPacket(this.context.basicInfoWrapper.getFullQQVesion())
.then()
.catch((err) => {
this.logger.logError.bind(this.core.context.logger);
this.errStack.push(err);
});
}
get available(): boolean {
return this.pkt?.available ?? false;
}