Fetching Guild Commands returns nothing
I am using the ApplicationCommandPermissionsUpdate event. I am trying to fetch the command using the
guild.commands.fetch()
method. This always returns empty and i'm not sure why.
Here is my some code for the ApplicationCommandPermissionsUpdate file:
Output for the logged collection, array and error
Please note that there are application commands in the server9 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.I am only forcing the fetch cuz i dont know what to do. by default i do not add this when fetching objects
What are you trying to achieve?
this is for a logging system. I am only trying to get the command object to access the command name.
+ id but i get that anyways
from what my output says that i understand. the server has no commands in it
Yeah, there are no guild commands that your app created there.
I'm not sure whether you can fetch another application's command.
For your app's global commands you'd need to fetch them on the command manager from your client object.
client.application.commands.set(commandsArray);
this is probably why. I don't make global commands. no matter. this logging still works with the bot itself. ill just have to ignore when other bot command perms change
thanks for the help 🙂Those are global commands.
Anyway, you're welcome!
i meant guild commands, sorry