Commands don't seem to update at all
I have tried re-deploying commands again, restarting my bot, restarting my Discord client, reinviting my bot to the server, checking the intents on discord.dev, and still nothing, I'm genuinely lost. I have also tried running the program with a different bot, but the commands don't even show up, and there's also no errors in the console. Is there something else I can do to troubleshoot this?
25 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:
deploy-commands.js:
The commands are also in the right directory
did you actually run the deploy script
A billion times.
Not your bot
node deploy-commands.js
, right?yes, or whatever you named your file
and did you log to confirm you are actually sending data
I did
this then
How should I do that?
:mdn: console: log() static method
The console.log() static method outputs a message to the console.
You really shoukd know how to log stuff by now..
I meant as in how can I get the commands I'm trying to deploy, I know about console.log
I hope you understand what I mean
You just log the body you deploy
You named it commands
It returned an empty table.
Are there commands in ./commands?
You are using subfolders
Your code does not account for subfolders
Moving the commands into the commands folder finally registered the commands, I was just following the discord js guide and usually putting the commands into commands\utility had no problems.
But now the commands aren't working and there are no errors in the console as well.
and do you listen for the interactionCreate event anywhere
also, the guide uses subfolders, so you should adapt your deploy code to use subfolders
Not the other way around
It does not, should I create a file for that?
I will look into it
depends on how your event handler works
I don't know if anyone will see this, but I did make a console.log for every interactionCreate event, and when I do run a slash command, it does log the ChatInputCommandInteraction, but still no errors show up in the console or does the bot reply.
every?
You only need one
Then use command handling for commands and a similar approach for buttons and other components