From 2566e30cac2cb146ef92e02815b22479e3729af4 Mon Sep 17 00:00:00 2001 From: DevAndromeda <46562212+DevAndromeda@users.noreply.github.com> Date: Thu, 21 Jul 2022 17:19:40 +0545 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Run=20entersState=20inside=20pla?= =?UTF-8?q?y()=20only?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Structures/Queue.ts | 4 ---- src/VoiceInterface/VoiceUtils.ts | 12 +----------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/src/Structures/Queue.ts b/src/Structures/Queue.ts index cdafc94..53602bf 100644 --- a/src/Structures/Queue.ts +++ b/src/Structures/Queue.ts @@ -206,10 +206,6 @@ class Queue { } }); - await this.player.voiceUtils.enterReady(this.connection.voiceConnection, { - maxTime: this.player.options.connectionTimeout || 30_000 - }); - return this; } diff --git a/src/VoiceInterface/VoiceUtils.ts b/src/VoiceInterface/VoiceUtils.ts index 99bf7ca..ec7a99d 100644 --- a/src/VoiceInterface/VoiceUtils.ts +++ b/src/VoiceInterface/VoiceUtils.ts @@ -1,5 +1,5 @@ import { VoiceChannel, StageChannel, Collection, Snowflake } from "discord.js"; -import { DiscordGatewayAdapterCreator, entersState, joinVoiceChannel, VoiceConnection, VoiceConnectionStatus } from "@discordjs/voice"; +import { DiscordGatewayAdapterCreator, joinVoiceChannel, VoiceConnection } from "@discordjs/voice"; import { StreamDispatcher } from "./StreamDispatcher"; class VoiceUtils { @@ -59,16 +59,6 @@ class VoiceUtils { return conn; } - public async enterReady(conn: VoiceConnection, options: { maxTime?: number } = {}) { - try { - conn = await entersState(conn, VoiceConnectionStatus.Ready, options?.maxTime ?? 20000); - return conn; - } catch (err) { - conn.destroy(); - throw err; - } - } - /** * Disconnects voice connection * @param {VoiceConnection} connection The voice connection