mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
fix: Error
This commit is contained in:
@@ -12,6 +12,7 @@ import {
|
|||||||
import { isNumeric, solveAsyncProblem } from '@/common/helper';
|
import { isNumeric, solveAsyncProblem } from '@/common/helper';
|
||||||
import { LimitedHashTable } from '@/common/message-unique';
|
import { LimitedHashTable } from '@/common/message-unique';
|
||||||
import { NTEventWrapper } from '@/common/event';
|
import { NTEventWrapper } from '@/common/event';
|
||||||
|
import { c } from 'vite/dist/node/types.d-aGj9QkWt';
|
||||||
|
|
||||||
export class NTQQGroupApi {
|
export class NTQQGroupApi {
|
||||||
context: InstanceContext;
|
context: InstanceContext;
|
||||||
@@ -337,19 +338,20 @@ export class NTQQGroupApi {
|
|||||||
}
|
}
|
||||||
this.context.session.getGroupService().destroyMemberListScene(sceneId);
|
this.context.session.getGroupService().destroyMemberListScene(sceneId);
|
||||||
return {
|
return {
|
||||||
infos: resMode2?.infos || result.result.infos,
|
infos: new Map([...(resMode2?.infos ?? []), ...result.result.infos]),
|
||||||
finish: result.result.finish,
|
finish: result.result.finish,
|
||||||
hasNext: resMode2?.hasNext,
|
hasNext: resMode2?.hasNext,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
async getGroupMembersV2(groupQQ: string, num = 3000): Promise<Map<string, GroupMember>> {
|
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) {
|
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) {
|
if (res.infos.size === 0 && res.finish) {
|
||||||
res = await this.tryGetGroupMembersV2(true, groupQQ, num);
|
res = await this.tryGetGroupMembersV2(true, groupQQ, 3000);
|
||||||
}
|
}
|
||||||
return res.infos;
|
return res.infos;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user