button.showModal( new Modal() .setCustomId("test") .setTitle("This is a test modal") .addComponents( new MessageActionRow() .addComponents( new TextInputComponent() .setCustomId("test") .setLabel("This is a test input.") .setStyle("SHORT") ) ) );
button.showModal( new Modal() .setCustomId("test") .setTitle("This is a test modal") .addComponents( new MessageActionRow() .addComponents( new TextInputComponent() .setCustomId("test") .setLabel("This is a test input.") .setStyle("SHORT") ) ) );
gives a type error
Argument of type 'MessageActionRow<MessageActionRowComponent, MessageActionRowComponentResolvable, APIActionRowComponent<APIMessageActionRowComponent>>' is not assignable to parameter of type 'MessageActionRow<TextInputComponent, ModalActionRowComponentResolvable, APIActionRowComponent<APITextInputComponent>> | (Required<...> & MessageActionRowOptions<...>)'.
Argument of type 'MessageActionRow<MessageActionRowComponent, MessageActionRowComponentResolvable, APIActionRowComponent<APIMessageActionRowComponent>>' is not assignable to parameter of type 'MessageActionRow<TextInputComponent, ModalActionRowComponentResolvable, APIActionRowComponent<APITextInputComponent>> | (Required<...> & MessageActionRowOptions<...>)'.
Any idea what I'm doing wrong?
Recent Announcements
Continue the conversation
Join the Discord to ask follow-up questions and connect with the community
d-Iaa
discord.js - Imagine an app
Support server for discord.js, a Node.js module to interact with Discord's apps API.