From ff825cd8b88035eb36d15230b1de375d19b37ead Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 5 Mar 2018 19:41:35 +0000 Subject: [PATCH] voice: fix #2331 (speaking not set back to false on stream ending) --- src/client/voice/dispatcher/StreamDispatcher.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/client/voice/dispatcher/StreamDispatcher.js b/src/client/voice/dispatcher/StreamDispatcher.js index d99c77c46..6eb108bbf 100644 --- a/src/client/voice/dispatcher/StreamDispatcher.js +++ b/src/client/voice/dispatcher/StreamDispatcher.js @@ -62,6 +62,7 @@ class StreamDispatcher extends Writable { this.on('finish', () => { // Still emitting end for backwards compatibility, probably remove it in the future! this.emit('end'); + this._setSpeaking(false); }); if (typeof volume !== 'undefined') this.setVolume(volume); @@ -251,9 +252,6 @@ class StreamDispatcher extends Writable { } _setSpeaking(value) { - if (this.speaking === value) return; - if (this.player.voiceConnection.status !== VoiceStatus.CONNECTED) return; - this.speaking = value; this.player.voiceConnection.setSpeaking(value); /** * Emitted when the dispatcher starts/stops speaking.