diff --git a/source/library/services/dynamic-voice-channels.ts b/source/library/services/dynamic-voice-channels.ts index 21f17f4ec..e3bea96a7 100644 --- a/source/library/services/dynamic-voice-channels.ts +++ b/source/library/services/dynamic-voice-channels.ts @@ -156,7 +156,7 @@ class DynamicVoiceChannelService extends LocalService { async #handleVoiceStateUpdate(newVoiceState: Logos.VoiceState): Promise { const oldVoiceState = this.oldVoiceStates.get(newVoiceState.userId); - if (oldVoiceState === undefined || oldVoiceState.channelId === undefined) { + if (oldVoiceState?.channelId === undefined) { await this.#handleConnect(newVoiceState); } else if (newVoiceState.channelId === undefined) { await this.#handleDisconnect(oldVoiceState);