Skip to content

Help with Typescript #1519

Closed Answered by Jiralite
MrAmericanMike asked this question in Q&A
Discussion options

You must be logged in to vote

Welcome to TypeScript!

const ROW = new ActionRowBuilder().addComponents(

ActionRowBuilder must have a generic that specifies what kind of components it holds. See the guide.


Your second issue is TypeScript protecting you. isCommand() only allows context menu command interactions and chat input command interactions through. However, context menu command interactions do not have a .getInteger() method. In the case your client receives such an interaction, it will crash. If you only want to allow chat input command interactions through, use isChatInputCommand() instead.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by MrAmericanMike
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants