refactor: apiInit Refactor

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

No files matched your search

+3 -2
View File
@@ -25,9 +25,10 @@ export class NTQQGroupApi {
constructor(context: InstanceContext, core: NapCatCore) {
this.context = context;
this.core = core;
this.initCache().then().catch(context.logger.logError.bind(context.logger));
}
async initApi() {
this.initCache().then().catch(this.context.logger.logError.bind(this.context.logger));
}
async initCache() {
this.groups = await this.getGroups();
for (const group of this.groups) {