mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 14:02:02 +00: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:
parent
952a7123f3
commit
e845758037
1 changed files with 3 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue