🐛 Fix voice state handler

This commit is contained in:
DevAndromeda 2022-07-19 20:43:10 +05:45
parent 0a460c6a7c
commit f60c4bbf5d

View file

@ -87,9 +87,9 @@ class Player extends EventEmitter<PlayerEvents> {
}
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);
}