mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
commit
8565aee8b6
@ -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}个群组缓存完成`);
|
||||||
}
|
}
|
||||||
|
@ -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(() => {
|
||||||
|
@ -81,7 +81,4 @@ export class NodeIKernelGroupListener {
|
|||||||
|
|
||||||
onShutUpMemberListChanged(...args: unknown[]) {
|
onShutUpMemberListChanged(...args: unknown[]) {
|
||||||
}
|
}
|
||||||
|
|
||||||
onGroupListInited(...args: unknown[]) {
|
|
||||||
}
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user