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
Kinect3000
Kinect30003y 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
Kinect3000
Kinect30003y 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
Want results from more Discord servers?
Add your server