aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMax Isom <[email protected]>2021-11-20 19:02:48 -0500
committerMax Isom <[email protected]>2021-11-20 19:02:48 -0500
commitb93e6644b76107fe1b6966d7775db777a290d473 (patch)
tree76969658192ec699b8ff1b72843a41f79971f981 /src
parent490b082587e6ff7428ea119b0071d8d50d92bd97 (diff)
parent381ee62b780f546b5c7652741bbeb9a36add2939 (diff)
downloadmuse-b93e6644b76107fe1b6966d7775db777a290d473.tar.xz
muse-b93e6644b76107fe1b6966d7775db777a290d473.zip
Merge branch 'master' into remove
Diffstat (limited to 'src')
-rw-r--r--src/services/player.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/services/player.ts b/src/services/player.ts
index 9568ce0..33cb4c2 100644
--- a/src/services/player.ts
+++ b/src/services/player.ts
@@ -443,13 +443,17 @@ export default class {
return;
}
- this.voiceConnection.on(VoiceConnectionStatus.Disconnected, this.onVoiceConnectionDisconnect.bind(this));
+ if (this.voiceConnection.listeners(VoiceConnectionStatus.Disconnected).length === 0) {
+ this.voiceConnection.on(VoiceConnectionStatus.Disconnected, this.onVoiceConnectionDisconnect.bind(this));
+ }
if (!this.audioPlayer) {
return;
}
- this.audioPlayer.on('stateChange', this.onAudioPlayerStateChange.bind(this));
+ if (this.audioPlayer.listeners('stateChange').length === 0) {
+ this.audioPlayer.on('stateChange', this.onAudioPlayerStateChange.bind(this));
+ }
}
private onVoiceConnectionDisconnect(): void {