mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 22:11:53 +00:00
voice: fix #2331 (speaking not set back to false on stream ending)
This commit is contained in:
parent
399d179ebc
commit
ff825cd8b8
1 changed files with 1 additions and 3 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue