From 0d666732c61ce98fe775bc5c34ebbef11b839ec2 Mon Sep 17 00:00:00 2001 From: Puyodead1 Date: Sat, 25 Mar 2023 20:21:13 -0400 Subject: oapi: bug fixes --- src/gateway/opcodes/LazyRequest.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/gateway') diff --git a/src/gateway/opcodes/LazyRequest.ts b/src/gateway/opcodes/LazyRequest.ts index 64e50d92..cde91a75 100644 --- a/src/gateway/opcodes/LazyRequest.ts +++ b/src/gateway/opcodes/LazyRequest.ts @@ -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 -- cgit 1.5.1