Having trouble with components

I'm trying to update Discord.js from 13 to 14, but I'm having trouble with components. TS is complaining about a missing type field in row, but adding it does nothing. What am I doing wrong?
const row = new ActionRowBuilder({
components: [
new ButtonBuilder({
customId: "verify",
label: "Verify",
style: ButtonStyle.Primary,
}),
],
});

interaction.channel?.send({
components: [row],
});
const row = new ActionRowBuilder({
components: [
new ButtonBuilder({
customId: "verify",
label: "Verify",
style: ButtonStyle.Primary,
}),
],
});

interaction.channel?.send({
components: [row],
});
2 Replies
Favna
Favna2y ago
const row = new ActionRowBuilder<ButtonBuilder>({
components: [
new ButtonBuilder({
customId: "verify",
label: "Verify",
style: ButtonStyle.Primary,
}),
],
});

interaction.channel?.send({
components: [row],
});
const row = new ActionRowBuilder<ButtonBuilder>({
components: [
new ButtonBuilder({
customId: "verify",
label: "Verify",
style: ButtonStyle.Primary,
}),
],
});

interaction.channel?.send({
components: [row],
});
pass the generic type
Ruin 🌈🐲
Ruin 🌈🐲OP2y ago
Ah, thanks.
Want results from more Discord servers?
Add your server