From b87485edb5a127a0437e58dc5fb23ac94184c0ac Mon Sep 17 00:00:00 2001 From: Snowflake107 Date: Sun, 13 Jun 2021 15:05:05 +0545 Subject: [PATCH] events --- src/Structures/Queue.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Structures/Queue.ts b/src/Structures/Queue.ts index e6612b4..1d7fa07 100644 --- a/src/Structures/Queue.ts +++ b/src/Structures/Queue.ts @@ -49,6 +49,9 @@ class Queue { const connection = await this.player.voiceUtils.connect(channel); this.connection = connection; + // it's ok to use this here since Queue listens to the events 1 time per play + this.connection.setMaxListeners(Infinity); + if (channel.type === "stage") await channel.guild.me.voice.setRequestToSpeak(true).catch(() => {}); return this; @@ -147,9 +150,6 @@ class Queue { this.play(nextTrack, { immediate: true }); } }); - - dispatcher.on("error", (e) => this.player.emit("error", this, e)); - dispatcher.on("debug", (msg) => this.player.emit("debug", this, msg)); } *[Symbol.iterator]() {