How to fetch the commandID of the command that was just executed
Hey there! I'm using discord.js v13.8.0 and I'm trying to get the command id of the command when its executed
so I can do something like: ${user} used the </command:0> command, here is some of my interactionCreate file:
8 Replies
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
As you can see it's undefined
Here's what I'm doing currently:
(when a user uses a command this happens)
(my interaction command structure)
You didn't pass any parameters to the fetch so it fetches all commands and your
cmd
is a Collection of commands.so should I just add
client.application.commands.fetch(command)
?
because that should fetch cmd or commandits undefined though
ah wait you mean
interaction.commandId