interaction response

Hey so my question is pretty simple, If I were to make ticket system or something and for example I want my embed with Create button to work all the time, should I code it's handler in the interactionCreate.js or should I make it as a standalone event. tried to explain as best as i could
7 Replies
d.js toolkit
d.js toolkit11mo ago
- 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 OP
mallusrgreat
mallusrgreat11mo ago
having one event is better
Shrewd 💫
Shrewd 💫OP11mo ago
so like it's better to have it in a standalone file ? writing it all in interactionCreate.js could later become a little of a mess or so
mallusrgreat
mallusrgreat11mo ago
you could separate it as different functions and call them all inside the event
Shrewd 💫
Shrewd 💫OP11mo ago
all in events folder, ya?
mallusrgreat
mallusrgreat11mo ago
no, probably a separate folder since your event handler might try to load the event off of it and it would crash
Shrewd 💫
Shrewd 💫OP11mo ago
fact alright ill just create some folder and export functions or whatever, i'll figure it out, thanks
Want results from more Discord servers?
Add your server