Queue#events
This commit is contained in:
parent
b87485edb5
commit
9e3b66ee8a
1 changed files with 4 additions and 1 deletions
|
@ -49,11 +49,14 @@ class Queue<T = unknown> {
|
|||
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
|
||||
// it's ok to use this here since Queue listens to the events 1 time per play and destroys the listener
|
||||
this.connection.setMaxListeners(Infinity);
|
||||
|
||||
if (channel.type === "stage") await channel.guild.me.voice.setRequestToSpeak(true).catch(() => {});
|
||||
|
||||
this.connection.on("error", err => this.player.emit("error", this, err));
|
||||
this.connection.on("debug", msg => this.player.emit("debug", this, msg));
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue