I have occurred an error in my Discord Bot. I have received this error in discord.js v11 and v12.
Is there any way to fix this issue?
(node:929) MaxListenersExceededWarning: Possible EventEmitter memory
leak detected. 11 message listeners added to [Client]. Use
emitter.setMaxListeners() to increase limit
I also have tried adding emitter.setMaxListeners() by itself in the code but didn’t work. Sorry if this sounds completely stupid, I have never occurred this error ever since I coded a discord.js bot until now.
This error also occurs in another coding platform (e.g. Repl.it, etc)
I saw that this is because of CPU usage but I’m not sure how I will be able to run this on my own laptop instead of a coding platform like Glitch.
Thank you buddy! It works, that part is removed from the log. Thank you so much! Lol, it’s probably some baby error and you’re probably like, “dude, there’s only 2 steps lol”. WOOHOO