mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
fix: Error
This commit is contained in:
parent
c3d4698af3
commit
61ddf38892
@ -12,6 +12,7 @@ import {
|
||||
import { isNumeric, solveAsyncProblem } from '@/common/helper';
|
||||
import { LimitedHashTable } from '@/common/message-unique';
|
||||
import { NTEventWrapper } from '@/common/event';
|
||||
import { c } from 'vite/dist/node/types.d-aGj9QkWt';
|
||||
|
||||
export class NTQQGroupApi {
|
||||
context: InstanceContext;
|
||||
@ -337,19 +338,20 @@ export class NTQQGroupApi {
|
||||
}
|
||||
this.context.session.getGroupService().destroyMemberListScene(sceneId);
|
||||
return {
|
||||
infos: resMode2?.infos || result.result.infos,
|
||||
infos: new Map([...(resMode2?.infos ?? []), ...result.result.infos]),
|
||||
finish: result.result.finish,
|
||||
hasNext: resMode2?.hasNext,
|
||||
};
|
||||
}
|
||||
|
||||
async getGroupMembersV2(groupQQ: string, num = 3000): Promise<Map<string, GroupMember>> {
|
||||
let res = await this.tryGetGroupMembersV2(true, groupQQ);
|
||||
console.log("-start-", groupQQ);
|
||||
let res = await this.tryGetGroupMembersV2(true, groupQQ, 3000);
|
||||
if (res.hasNext || !res.finish || res.infos.size === 0) {
|
||||
res = await this.tryGetGroupMembersV2(false, groupQQ, num);
|
||||
res = await this.tryGetGroupMembersV2(false, groupQQ, 3000);
|
||||
}
|
||||
if ((res.infos.size === 0 || res.infos.size === 30) && !res.finish) {
|
||||
res = await this.tryGetGroupMembersV2(true, groupQQ, num);
|
||||
if (res.infos.size === 0 && res.finish) {
|
||||
res = await this.tryGetGroupMembersV2(true, groupQQ, 3000);
|
||||
}
|
||||
return res.infos;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user