🐛 Make sure to pass a boolean to setPaused
This commit is contained in:
parent
b643367862
commit
d800c23057
1 changed files with 8 additions and 4 deletions
|
@ -88,9 +88,11 @@ class Player extends EventEmitter<PlayerEvents> {
|
|||
|
||||
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<PlayerEvents> {
|
|||
|
||||
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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue