Empty Array when trying to get Guild Application Commands
I'm trying to retrieve all of the application commands from a discord.js slash command interaction. I have the below code snippet.
However, this returns an empty Collection Map. []
Is there a missing permission for the bot?
I'm using the slash command /setup to execute the function. I'd expect at least 1 object to be returned wit that being the /setup Guild command.
6 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!Using node v20.9.0
did you deploy your commands globally ?
These are guild only commands. So no.. is that required ?
no
but if you get an empty collection, your command is deployed globally
Oh ok I’ll double check