From bce34c9fc83315dac9ff5849beb961b88b9aa67d Mon Sep 17 00:00:00 2001 From: DevAndromeda <46562212+DevAndromeda@users.noreply.github.com> Date: Sat, 7 Aug 2021 21:21:58 +0545 Subject: [PATCH] feat(Player): add connectionTimeout option --- src/VoiceInterface/StreamDispatcher.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/VoiceInterface/StreamDispatcher.ts b/src/VoiceInterface/StreamDispatcher.ts index 6f2f702..513178b 100644 --- a/src/VoiceInterface/StreamDispatcher.ts +++ b/src/VoiceInterface/StreamDispatcher.ts @@ -185,7 +185,7 @@ class StreamDispatcher extends EventEmitter { async playStream(resource: AudioResource = this.audioResource) { if (!resource) throw new PlayerError("Audio resource is not available!", ErrorStatusCode.NO_AUDIO_RESOURCE); if (!this.audioResource) this.audioResource = resource; - if (this.voiceConnection.state.status !== VoiceConnectionStatus.Ready) await entersState(this.voiceConnection, VoiceConnectionStatus.Ready, 20000); + if (this.voiceConnection.state.status !== VoiceConnectionStatus.Ready) await entersState(this.voiceConnection, VoiceConnectionStatus.Ready, this.connectionTimeout); this.audioPlayer.play(resource); return this;