summary refs log tree commit diff
path: root/src/gateway
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-04-29 01:11:22 +1000
committerGitHub <noreply@github.com>2023-04-29 01:11:22 +1000
commit009a3ad27f994318f72deb016ef4042cdd070865 (patch)
treea759056de60fb7ed285314e63d378315dfef40b0 /src/gateway
parentstart listening before starting components in bundle (diff)
parentMerge branch 'master' into openapi (diff)
downloadserver-ts-009a3ad27f994318f72deb016ef4042cdd070865.tar.xz
Merge pull request #1032 from spacebarchat/openapi
Better OpenAPI
Diffstat (limited to 'src/gateway')
-rw-r--r--src/gateway/opcodes/LazyRequest.ts4
1 files changed, 3 insertions, 1 deletions
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