oapi: bug fixes

This commit is contained in:
Puyodead1
2023-04-13 15:41:23 -04:00
parent 3a23842924
commit 0d666732c6
10 changed files with 481 additions and 1028 deletions
+3 -1
View File
@@ -267,7 +267,9 @@ export async function onLazyRequest(this: WebSocket, { d }: Payload) {
if (!Array.isArray(ranges)) throw new Error("Not a valid Array");
const member_count = await Member.count({ where: { guild_id } });
const ops = await Promise.all(ranges.map((x) => getMembers(guild_id, x)));
const ops = await Promise.all(
ranges.map((x) => getMembers(guild_id, x as [number, number])),
);
// TODO: unsubscribe member_events that are not in op.members