This is the code im using:
client.on('interactionCreate', async (interaction) => {
if (interaction.isButton()) {
if (interaction.customId.startsWith("thread")) {
const modal = new ModalBuilder()
.setCustomId('modalId')
.setTitle('McSkripters Helper');
const name = new TextInputBuilder()
.setCustomId('DisName')
.setLabel("[REQUIRED] ENTER DISCORD NAME HERE")
.setStyle(TextInputStyle.Short);
const issue = new TextInputBuilder()
.setCustomId('DisIssue')
.setLabel("[REQUIRED] DISCRIBE YOUR ISSUE")
.setStyle(TextInputStyle.Short);
const code = new TextInputBuilder()
.setCustomId('DisCode')
.setLabel("[OPTIONAL] ADD YOUR CODE")
.setStyle(TextInputStyle.Paragraph);
const error = new TextInputBuilder()
.setCustomId('DisError')
.setLabel("[OPTIONAL] POST YOUR ERRORS")
.setStyle(TextInputStyle.Short);
const firstActionRow = new ActionRowBuilder().addComponents(name);
const secondActionRow = new ActionRowBuilder().addComponents(issue);
const thirdActionRow = new ActionRowBuilder().addComponents(code);
const fourthActionRow = new ActionRowBuilder().addComponents(error);
modal.addComponents(firstActionRow, secondActionRow, thirdActionRow, fourthActionRow);
await interaction.showModal(modal);
}
}
});``` Error here:
```js
at async ButtonInteraction.showModal (/home/opc/SkParser/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:246:5)
1|index | at async Client.<anonymous> (/home/opc/SkParser/index.js:170:13) {
1|index | rawError: { message: 'Unknown interaction', code: 10062 }```