summary refs log tree commit diff
path: root/src/opcodes
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-08-12 16:47:52 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-08-12 16:47:52 +0200
commit421cf4c3db9a2810285b123dfd82f116f81d0fa7 (patch)
tree288d33739c2a947522fbb69a320aa4d3c5cbec2b /src/opcodes
parent:bug: fix voicestate (diff)
downloadserver-421cf4c3db9a2810285b123dfd82f116f81d0fa7.tar.xz
:sparkles: rabbitmq
Diffstat (limited to '')
-rw-r--r--src/opcodes/LazyRequest.ts21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/opcodes/LazyRequest.ts b/src/opcodes/LazyRequest.ts

index 8a7bb8c4..b1d553b9 100644 --- a/src/opcodes/LazyRequest.ts +++ b/src/opcodes/LazyRequest.ts
@@ -23,6 +23,7 @@ export async function onLazyRequest(this: WebSocket, { d }: Payload) { const { guild_id, typing, channels, activities } = d as LazyRequest; const permissions = await getPermission(this.user_id, guild_id); + permissions.hasThrow("VIEW_CHANNEL"); // MongoDB query to retrieve all hoisted roles and join them with the members and users collection const roles = toObject( @@ -70,16 +71,16 @@ export async function onLazyRequest(this: WebSocket, { d }: Payload) { const items = []; for (const role of roles) { - items.push({ - group: { - count: role.members.length, - id: role.id === guild_id ? "online" : role.name - } - }); - for (const member of role.members) { - member.roles.remove(guild_id); - items.push({ member }); - } + items.push({ + group: { + count: role.members.length, + id: role.id === guild_id ? "online" : role.name, + }, + }); + for (const member of role.members) { + member.roles.remove(guild_id); + items.push({ member }); + } } return Send(this, {