Possible EventEmitter memory leak
I've a /help command that contains buttons to change the embed content. If i click 11 times on the green buttons (doesn't matter the order) it will appear a message on my console MaxListenersExceededWarning: Possible EventEmitter memory leak detected.. How can i solve it or discovery why it is appearing this error?
D.JS Version: 14.13.0
Ps.: I don't want use emitter.setMaxListeners()
7 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!
- ✅
Marked as resolved by OPBtw, if i press the same button 11 times, it will show the message:
MaxListenersExceededWarning: Possible EventEmitter memory leak detected.
Ps.: Ping me pleaseSorry 😅 here is the interactionTypes.js https://pastebin.com/V1s0PJ0x
Pastebin
module.exports = async (client, Collection, GB) => { client....
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Also here: https://pastebin.com/9v458X2v
Pastebin
const { Collection, EmbedBuilder, ActionRowBuilder, ButtonBuilder, ...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Damn, i didnt' knew about that
So i need to find out another way to prevent my bot shutdown if an error happens :/
Later i will test it and give here a feedback, if it works i will mark as solved
Ye, after a few seconds i think about this little change too