Multiple Interactions from collector

so i made this function, and for some reason i started receiving same events like 3+ times when button being clicked, i have no idea what or why
7 Replies
d.js toolkit
d.js toolkit2y ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
Digital
DigitalOP2y ago
(ping me if any ideas)
Digital
DigitalOP2y ago
just normal command
d.js docs
d.js docs2y ago
To share long code snippets use a service like gist, sourcebin, starbin, or similar instead of posting them as large code blocks.
Digital
DigitalOP2y ago
yes wait basically the flow is - command -> call function X - call collector -> switch custom id -> (for modal button) -> call function X -> open modal and wait for response -> if response, call function X, if no, do nothing https://sourceb.in/D3n9XzGTOT or wait could it be because i have some "active code" in function (like that modal) when it calls itself, it doesnt stop the collector so then it triggers few times
Digital
DigitalOP2y ago
Digital
DigitalOP2y ago
wait wym how can they use menu if they dont click a button uhm no ig which line, im lost ah that all is just in one big switch that's why it never happened that because of buttons, now only when i added modals it clones and stays active any idea how to improve that?
Want results from more Discord servers?
Add your server