summary refs log tree commit diff
path: root/src/opcodes
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-05-27 18:35:19 +0200
committerGitHub <noreply@github.com>2021-05-27 18:35:19 +0200
commit2958b4c3515d0064c49ffc801e5c013176da9ee3 (patch)
treefc8b8ce4c08a3defe933425ae9b0b0ad83ed4d27 /src/opcodes
parentMerge pull request #68 from luth31/upstream (diff)
parentUpdate LazyRequest.ts (diff)
downloadserver-2958b4c3515d0064c49ffc801e5c013176da9ee3.tar.xz
Merge pull request #70 from 9qz/master
✨ GUILD_MEMBER_LIST_UPDATE
Diffstat (limited to 'src/opcodes')
-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 8b97e84a..8a7bb8c4 100644 --- a/src/opcodes/LazyRequest.ts +++ b/src/opcodes/LazyRequest.ts
@@ -70,15 +70,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, - }, - }); - for (const member of role.members) { - 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, { @@ -90,7 +91,7 @@ export async function onLazyRequest(this: WebSocket, { d }: Payload) { { range: [0, 99], op: "SYNC", - items: items, + items, }, ], online_count: member_count, // TODO count online count