mirror of
https://github.com/spacebarchat/server.git
synced 2026-10-23 19:33:05 +00:00
Test fix for that voice state error
This commit is contained in:
1 file changed
+4
-1
@@ -58,6 +58,9 @@ export async function onVoiceStateUpdate(this: WebSocket, data: Payload) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 'Fix' for this one voice state error
|
||||||
|
if (!voiceState.guild_id) return;
|
||||||
|
|
||||||
//TODO the member should only have these properties: hoisted_role, deaf, joined_at, mute, roles, user
|
//TODO the member should only have these properties: hoisted_role, deaf, joined_at, mute, roles, user
|
||||||
//TODO the member.user should only have these properties: avatar, discriminator, id, username
|
//TODO the member.user should only have these properties: avatar, discriminator, id, username
|
||||||
//TODO this may fail
|
//TODO this may fail
|
||||||
@@ -65,7 +68,7 @@ export async function onVoiceStateUpdate(this: WebSocket, data: Payload) {
|
|||||||
where: { id: voiceState.user_id, guild_id: voiceState.guild_id },
|
where: { id: voiceState.user_id, guild_id: voiceState.guild_id },
|
||||||
relations: ["user", "roles"],
|
relations: ["user", "roles"],
|
||||||
});
|
});
|
||||||
|
|
||||||
//If the session changed we generate a new token
|
//If the session changed we generate a new token
|
||||||
if (voiceState.session_id !== this.session_id)
|
if (voiceState.session_id !== this.session_id)
|
||||||
voiceState.token = genVoiceToken();
|
voiceState.token = genVoiceToken();
|
||||||
|
|||||||
Reference in new issue
Block a user