From 713309e7bb87b10ca7432fdbbd7ca65fcddd4882 Mon Sep 17 00:00:00 2001 From: SpaceEEC Date: Sat, 29 Feb 2020 19:07:23 +0100 Subject: [PATCH] =?UTF-8?q?fix(playinterface):=20lazy=20require=20VoiceBro?= =?UTF-8?q?adcast=20to=20avoid=20circul=E2=80=A6=20(#3864)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/client/voice/util/PlayInterface.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/client/voice/util/PlayInterface.js b/src/client/voice/util/PlayInterface.js index 0b08272d9..dd8121240 100644 --- a/src/client/voice/util/PlayInterface.js +++ b/src/client/voice/util/PlayInterface.js @@ -60,7 +60,8 @@ class PlayInterface { * @returns {StreamDispatcher} */ play(resource, options = {}) { - if (resource instanceof Broadcast) { + const VoiceBroadcast = require('../VoiceBroadcast'); + if (resource instanceof VoiceBroadcast) { if (!this.player.playBroadcast) throw new Error('VOICE_PLAY_INTERFACE_NO_BROADCAST'); return this.player.playBroadcast(resource, options); } @@ -91,6 +92,3 @@ class PlayInterface { } module.exports = PlayInterface; - -// eslint-disable-next-line import/order -const Broadcast = require('../VoiceBroadcast');