Merge pull request #310 from cnxysoft/upmain

style: 规范代码
This commit is contained in:
Alen 2024-08-27 14:11:33 +08:00 committed by GitHub
commit 8565aee8b6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 1 additions and 9 deletions

View File

@ -9,9 +9,8 @@ import {
KickMemberV2Req, KickMemberV2Req,
MemberExtSourceType, MemberExtSourceType,
NapCatCore, NapCatCore,
NodeIKernelGroupService,
} from '@/core'; } from '@/core';
import { isNumeric, runAllWithTimeout, sleep } from '@/common/helper'; import { isNumeric, runAllWithTimeout } from '@/common/helper';
export class NTQQGroupApi { export class NTQQGroupApi {
context: InstanceContext; context: InstanceContext;
@ -30,8 +29,6 @@ export class NTQQGroupApi {
this.groups = await this.getGroups(); this.groups = await this.getGroups();
for (const group of this.groups) { for (const group of this.groups) {
this.groupCache.set(group.groupCode, group); this.groupCache.set(group.groupCode, group);
//const data = await this.getGroupMembers(group.groupCode, 3000);
//this.groupMemberCache.set(group.groupCode, data);
} }
this.context.logger.logDebug(`加载${this.groups.length}个群组缓存完成`); this.context.logger.logDebug(`加载${this.groups.length}个群组缓存完成`);
} }

View File

@ -160,10 +160,8 @@ export class NapCatCore {
} else { } else {
this.apis.GroupApi.groupMemberCache.set(groupCode, arg.infos); this.apis.GroupApi.groupMemberCache.set(groupCode, arg.infos);
} }
//console.log('onMemberListChange', groupCode, arg.infos.size);
}; };
groupListener.onMemberInfoChange = (groupCode, dataSource, members) => { groupListener.onMemberInfoChange = (groupCode, dataSource, members) => {
//console.log('onMemberInfoChange', groupCode, dataSource, members.size);
if (dataSource === DataSource.LOCAL && members.get(this.selfInfo.uid)?.isDelete) { if (dataSource === DataSource.LOCAL && members.get(this.selfInfo.uid)?.isDelete) {
// 自身退群或者被踢退群 5s用于Api操作 之后不再出现 // 自身退群或者被踢退群 5s用于Api操作 之后不再出现
setTimeout(() => { setTimeout(() => {

View File

@ -81,7 +81,4 @@ export class NodeIKernelGroupListener {
onShutUpMemberListChanged(...args: unknown[]) { onShutUpMemberListChanged(...args: unknown[]) {
} }
onGroupListInited(...args: unknown[]) {
}
} }