error when trying to add a button to a message

heya, i am trying to make an application system for my discord server. i am trying to add an action row with buttons, but i keep getting the same error no matter what i do. here is my code:

const row = new ActionRowBuilder<ButtonBuilder>()
    .addComponents(
        new ButtonBuilder()
            .setCustomId('submit')
            .setLabel('Submit')
            .setStyle(ButtonStyle.Success),
        new ButtonBuilder()
            .setCustomId('cancel')
            .setLabel('Cancel')
            .setStyle(ButtonStyle.Danger)
    );

await (introMessage.channel as DMChannel).send({
    content: 'Please confirm your responses:',
    components: [row] // THE ERROR IS ON THIS LINE !!
});


this is the error i am getting

Type 'ActionRowBuilder<ButtonBuilder>' is not assignable to type 'APIActionRowComponent<APIMessageActionRowComponent> | JSONEncodable<APIActionRowComponent<APIMessageActionRowComponent>> | ActionRowData<...>'.
  Property 'type' is missing in type 'ActionRowBuilder<ButtonBuilder>' but required in type 'ActionRowData<MessageActionRowComponentData | MessageActionRowComponentBuilder>'.


some help would be extremely appreciated!
Was this page helpful?