fix: VoiceState#member is not nullable (#1018)

This reverts commit 7750f8f467.
This commit is contained in:
rigormorrtiss
2021-06-05 12:05:13 +04:00
committed by GitHub
parent 80f4f1c50e
commit 501772a9b5
3 changed files with 4 additions and 8 deletions
-3
View File
@@ -9,9 +9,6 @@ export async function handleVoiceStateUpdate(data: DiscordGatewayPayload) {
const payload = data.d as VoiceState;
if (!payload.guildId) return;
// The "member" field in the payload is `null` if the user is in a live stage but not in the guild.
if (payload.member === null) return eventHandlers.voiceLurkerJoin?.(payload);
const guild = await cacheHandlers.get("guilds", snowflakeToBigint(payload.guildId));
if (!guild) return;