No thanks, I like to help publicly so that everyone can benefit from the answers.
I see you’ve noticed another thread with a suggested solution: Help me (MaxListeners) - #6 by yogurtsyum
Do you have lots of blocks like this?:
client.on(`message`, async function (msg){
});
Or is there a chance that you are repeatedly instantiating part of your bot in a loop or a lightweight function without realising it?
It might be helpful to add in something like console.trace("Listener attached")
inside your client.on
blocks so you can see in your logs when and why they are being called.
I doubt your source code is that sensitive unless you’ve put your discord keys in there (tip, put them in .env
instead) so maybe you could share some snippets of it.
Hope this helps