1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-11 05:02:37 +01:00

Merge pull request #70 from 9qz/master

 GUILD_MEMBER_LIST_UPDATE
This commit is contained in:
Flam3rboy 2021-05-27 18:35:19 +02:00 committed by GitHub
commit 2958b4c351
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 38 additions and 2267 deletions

2282
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -13,7 +13,7 @@
"author": "Fosscord",
"license": "ISC",
"dependencies": {
"@fosscord/server-util": "^1.3.3",
"@fosscord/server-util": "^1.3.7",
"ajv": "^8.5.0",
"dotenv": "^8.2.0",
"jsonwebtoken": "^8.5.1",

View File

@ -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