Fix possible event memory leak

This commit is contained in:
Essem 2022-06-28 21:54:15 -05:00
parent 0da673975b
commit cef69fa6c2
No known key found for this signature in database
GPG key ID: 7D497397CC3A2A8C

View file

@ -160,7 +160,7 @@ export async function nextSong(client, options, connection, track, info, music,
// no-op // no-op
} }
} }
connection.removeAllListeners("error"); connection.removeAllListeners("exception");
connection.removeAllListeners("end"); connection.removeAllListeners("end");
connection.playTrack({ track }); connection.playTrack({ track });
players.set(voiceChannel.guild.id, { player: connection, type: music ? "music" : "sound", host: host, voiceChannel: voiceChannel, originalChannel: options.channel, loop, shuffle, playMessage: playingMessage }); players.set(voiceChannel.guild.id, { player: connection, type: music ? "music" : "sound", host: host, voiceChannel: voiceChannel, originalChannel: options.channel, loop, shuffle, playMessage: playingMessage });