Application commands not registering
For some reason my application commands haven't been registering lately.
No errors, the call to
rest.put()
just never finishes.
I've tried changing the token to "a" or something equally bogus (returns 401 Unauthorized), so that is not the issue. My command objects are all valid.
Here's the script I'm using to register application commands:
Any help is appreciated.4 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!discord.js@14.13.0
node v20.5.1
are your command files in JS or just TS?
also idk if
RESTPostAPIChatInputApplicationCommandsJSONBody[]
is really needed in commands
variable.They are all written in TypeScript, my whole bot is.
You're right, it's not. Once upon a time TypeScript was complaining so I explicitly typed it at declaration.
Nope. Even on the first try for the day nothing happens
Doesn't matter when the timeframe starts
I've tried once every 24h
Believe me, it's not that
The commands are not located if I use the
.js
extension in my code
I'm using tsc... just to type-check.
I use tsx to run TypeScript files without transpiling with tsc. That's why I need the *.ts extension.
Must have been some problem with Discord's backend. I deleted my current application, created a new one, updated the ID and token... and all commands registered in just 5 seconds.