interaction.commandName, does not exist on 'interactionCreate' emiited type

Why does TS return this error when all works fine in JS?
7 Replies
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Grif
GrifOP3y ago
which is the correct type, in the docs it says this emits the interaction type
Inky
Inky3y ago
Interaction can be any interaction, including buttons and modal
Grif
GrifOP3y ago
yeah, that's why I will add the cheking to see if the interaction is command interaction so i have to specify a different type? wdym
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Inky
Inky3y ago
Use the .isCommand() type guard
Grif
GrifOP3y ago
oh wow, i geninuly thought that was the least of my worries. it resolved the issue, just goes on to show to do the stupidest things, even if they seem obvious thank you everyone

Did you find this page helpful?