diff --git a/src/Player.ts b/src/Player.ts index 1123526..04894a1 100644 --- a/src/Player.ts +++ b/src/Player.ts @@ -88,9 +88,11 @@ class Player extends EventEmitter { if (!oldState.channelId && newState.channelId && newState.member.id === newState.guild.members.me.id) { if (!oldState.serverMute && newState.serverMute) { - queue.setPaused(newState.serverMute); + // state.serverMute can be null + queue.setPaused(!!newState.serverMute); } else if (!oldState.suppress && newState.suppress) { - queue.setPaused(newState.suppress); + // state.suppress can be null + queue.setPaused(!!newState.suppress); if (newState.suppress) { newState.guild.members.me.voice.setRequestToSpeak(true).catch(Util.noop); } @@ -99,9 +101,11 @@ class Player extends EventEmitter { if (oldState.channelId === newState.channelId && newState.member.id === newState.guild.members.me.id) { if (!oldState.serverMute && newState.serverMute) { - queue.setPaused(newState.serverMute); + // state.serverMute can be null + queue.setPaused(!!newState.serverMute); } else if (!oldState.suppress && newState.suppress) { - queue.setPaused(newState.suppress); + // state.suppress can be null + queue.setPaused(!!newState.suppress); if (newState.suppress) { newState.guild.members.me.voice.setRequestToSpeak(true).catch(Util.noop); }