mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +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) {
|
||||
this.player.voiceConnection.setSpeaking(value);
|
||||
if (typeof this.player.voiceConnection !== 'undefined') {
|
||||
this.player.voiceConnection.setSpeaking(value);
|
||||
}
|
||||
/**
|
||||
* Emitted when the dispatcher starts/stops speaking.
|
||||
* @event StreamDispatcher#speaking
|
||||
|
||||
Reference in New Issue
Block a user