Merge branch 'master' into remove

This commit is contained in:
Max Isom 2021-11-20 19:02:48 -05:00
commit b93e6644b7
No known key found for this signature in database
GPG key ID: 25C9B1A7F6798880

View file

@ -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 {