Problem with rights and logical code separation
In general, the problem I have is that I have a main directory
├── buttonHandlers\
├────── yesBanAction.js
├────── banAction.js
├────── cancelBanAction.js
├────── yesKickAction.js
├────── KickAction.js
├────── cancelKickAction.js
├────── girlGender.js
├────── maleGender.js
├────── verifyAction.js
├──────nonAdmissions.js
├── commands\utility
├──────action.js
├──────ping.js
├──────server.js
├──────user.js
├── events/
├──────interactionButton.js
├──────interactionCommand.js
├──────ready.js
├── modalHandler/
├──────modalNonAdmissions.js
config.json
deploy-commands.js
index.js
package-lock.json
package.json
and it turns out that I want all the command files in the buttonHandlers directory to be also internally divided into folders like 3 files related to ban were in the ban folder, but the problem is that I can’t register them in the collection in index.js below I’ll also post the code index.js
There is also a secondary problem, let’s say in the banAction file, I need to check that the button is not pressed by someone else, but I can’t do this, I’ll also post the banAction code below
3 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!index.js
banAction
I really hope for your help