mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-19 21:13:30 +01:00
fix(StreamDispatcher): only update speaking for non broadcasts (#2437)
If the player is a BroadcastAudioPlayer it has no VoiceConnection directly associated with it.
This commit is contained in:
@@ -253,7 +253,9 @@ class StreamDispatcher extends Writable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_setSpeaking(value) {
|
_setSpeaking(value) {
|
||||||
this.player.voiceConnection.setSpeaking(value);
|
if (typeof this.player.voiceConnection !== 'undefined') {
|
||||||
|
this.player.voiceConnection.setSpeaking(value);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Emitted when the dispatcher starts/stops speaking.
|
* Emitted when the dispatcher starts/stops speaking.
|
||||||
* @event StreamDispatcher#speaking
|
* @event StreamDispatcher#speaking
|
||||||
|
|||||||
Reference in New Issue
Block a user