summary refs log tree commit diff
path: root/src/opcodes/LazyRequest.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/opcodes/LazyRequest.ts')
-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