From f60c4bbf5db0f64c4d02673276cd4cd97dcede82 Mon Sep 17 00:00:00 2001 From: DevAndromeda <46562212+DevAndromeda@users.noreply.github.com> Date: Tue, 19 Jul 2022 20:43:10 +0545 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20voice=20state=20handler?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Player.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Player.ts b/src/Player.ts index c0d7795..512685c 100644 --- a/src/Player.ts +++ b/src/Player.ts @@ -87,9 +87,9 @@ class Player extends EventEmitter { } if (!oldState.channelId && newState.channelId && newState.member.id === newState.guild.members.me.id) { - if (newState.serverMute || !newState.serverMute) { + if (oldState.serverMute !== newState.serverMute) { queue.setPaused(newState.serverMute); - } else if (newState.suppress || !newState.suppress) { + } else if (oldState.suppress !== newState.suppress) { if (newState.suppress) newState.guild.members.me.voice.setRequestToSpeak(true).catch(Util.noop); queue.setPaused(newState.suppress); }