ContextMenuCommand same name as a SlashCommand
If I create a SlashCommand called test and a ContextMenuCommand called test too, it will crash/not work fine or it's ok?
9 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'm not sure, but you can try it and see
If nobody knows I will try. I preferred to ask in case it gives error and not be able to remove it from the rest
If you typeguard correctly
wdym
and btw, another similar queston, can I add an emoji to a command name??
BaseInteraction#isUserContextMenuCommand()
Indicates whether this interaction is a UserContextMenuCommandInteraction
thats an example of a typeguard
no
Ohhh I think I see the problem. I could but I have to call one or the other depending on the type, right?
yes
if you typeguard all your interactions properly you should be able to have different types with the same customid / name