jack3898 / discord-youtube-bot-2

A powerful Discord YouTube Bot.
0 stars 0 forks source link

Event listener warning #2

Closed jack3898 closed 2 years ago

jack3898 commented 2 years ago

Problem: When you skip multiple songs (11+), you get a warning from Node.js saying you have got 11+ event listeners.

Potential solution: A pointer-based queue system. Currently, when a queue runs it sits in a while loop, and when the song finishes, the while loop condition resolves to true from it being a promise and when the queue ends it resolves to null. I think removing the while loop, making a pointer-based queue with good event handling will work.

Comments: This does not break the bot, but it needs optimising!

jack3898 commented 2 years ago

Fixed as of d688e58c2b2b2c6503518cf328e0ef5077b4922c