diff --git a/src/client/voice/VoiceBroadcast.js b/src/client/voice/VoiceBroadcast.js index 421988a65..8f83c4749 100644 --- a/src/client/voice/VoiceBroadcast.js +++ b/src/client/voice/VoiceBroadcast.js @@ -28,6 +28,14 @@ class VoiceBroadcast extends EventEmitter { this.player = new BroadcastAudioPlayer(this); } + /** + * The current master dispatcher, if any. This dispatcher controls all that is played by subscribed dispatchers. + * @type {?BroadcastDispatcher} + */ + get dispatcher() { + return this.player.dispatcher; + } + /** * Plays the given file in the voice connection. * @param {string} file The absolute path to the file diff --git a/src/client/voice/player/BroadcastAudioPlayer.js b/src/client/voice/player/BroadcastAudioPlayer.js index a26f90efc..052c9ea0b 100644 --- a/src/client/voice/player/BroadcastAudioPlayer.js +++ b/src/client/voice/player/BroadcastAudioPlayer.js @@ -18,7 +18,7 @@ class AudioPlayer extends BasePlayer { createDispatcher(options, streams) { this.destroyDispatcher(); - const dispatcher = new BroadcastDispatcher(this, options, streams); + const dispatcher = this.dispatcher = new BroadcastDispatcher(this, options, streams); return dispatcher; } }