command handler not registering commands
. I'll upload sourcebins one moment
30 Replies
• 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.File layout
So no issues other than it says the command loads, but it doesn't register within discord
Do you run the deploy file itself
and why do you have 3 interactionCreate listeners
Buttons, commands, menus
It's extremely rough draft on that I just let copilot make them lmfso
The register command does run as that file is the one that logs the commands loaded
It is logging the command as well
you can also just create one listener
and that is your index file you run
You never run your deploy file
Yeah I will compile the listeners into one once I get the commands to run
Oh my god
I remember what I did
It does run. It's inside my package.json to run
but you run node .
node . =/= npm run
just do node register.js
Changed that and still nothing
what did you change?
You shouldn't change anything
Just run what i said
The script section
I changed it to node register.js
...
you never run that script in the first place as i told you before
Just run node register.js directly
Ok, so I ran that directory and the command loaded, printed it and showed it but bot immediately shut down
because the register command just registers your commands
nothing more
Oh!!!!!!!!!!
This just clicked
So basically anytime I add a command, do node register.js
yes
Any other time just do node .
yep
Does discord unregister after a set amount of time?
no
Perfect Ty
So add and remove, do node register
remove would be passing in an empty array as body and then re-registering your commands
Perfect. I can adjust commands tho just fine? Or every adjustment I have to re register
Auto correct literally fails me
whenever you add / edit a command you need to re-register yes
Ah crap
Ok
you should be able to do that while your bot is running