My role buttons interfere with everything
https://sourceb.in/darkdK0SWZ
I am pretty sure its because of the lines 33 or so, but I can't really solve the problem.
Essentially, all of my slash and button commands stop working when this runs.
6 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!14.15.3 and 22.3.0
for discord js and node respectively
I think checking if the button is from this file with
if (!roles.some((role) => role.id === interaction.customId)) {
return; // Ignore interactions from other buttons
}
worked, I am not %100 sure but
dont nest your listeners
and isButton is a function, not a property
sorry, I am kinda returning to coding so I am not %100 sure what you mean
you should know the difference between a function and a property
a function has ()
no I know that
oh yeah
I fixed that later after posting the code