mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-07 19:22:14 +09:00
perf(guild): fetch guild members a thousand at a time (#2201)
This commit is contained in:
@@ -1360,7 +1360,9 @@ export class RpcService {
|
||||
afterUserId?: UserID;
|
||||
limit?: number;
|
||||
}): Promise<RpcResponseGuildCollectionData> {
|
||||
await this.getGuildOrThrow(guildId);
|
||||
if (!afterUserId) {
|
||||
await this.getGuildOrThrow(guildId);
|
||||
}
|
||||
const chunkSize = this.resolveGuildCollectionLimit(limit);
|
||||
const members = await this.guildRepository.listMembersPaginated(guildId, chunkSize + 1, afterUserId);
|
||||
const hasMore = members.length > chunkSize;
|
||||
|
||||
Reference in New Issue
Block a user