Skip to content
Advertisement

Discord.js Error – MaxListenersExceededWarning: Possible EventEmitter memory leak detected

Every time I try to make more than 10 commands I get the error:

JavaScript

I tried fixing it by doing emitter.setMaxListeners() and it didn’t fix it so I searched online and tried to fix it by using process.setMaxListeners(0); but that didn’t work either. If there is a fix for this please let me know, and if you want to see what code I have written for my bot please let me know which part of the code you would like to see.

Advertisement

Answer

JavaScript

it’s not emitter or process you are doing it to, it’s the client. Oh and I am pretty sure you need it at the top of your code, before your commands

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement