I'm trying to send a button component with a message but i get the following errors:
Type 'ActionRowBuilder<AnyComponentBuilder>' is not assignable to type 'APIActionRowComponent<APIMessageActionRowComponent> | JSONEncodable<APIActionRowComponent<APIMessageActionRowComponent>> | ActionRowData<...>'.
Property 'type' is missing in type 'ActionRowBuilder<AnyComponentBuilder>' but required in type 'ActionRowData<MessageActionRowComponentBuilder | MessageActionRowComponentData>'.
const button = new ButtonBuilder()
.setCustomId("qac_sr")
.setLabel("Request")
.setStyle(ButtonStyle.Success);
const row = new ActionRowBuilder()
.addComponents(button)
client.guilds.fetch("id").then((guild) => {
(guild.channels.fetch("id") as Promise<TextChannel>).then((channel) => {
channel.send({
content: "Click the button below to request a test",
components: [row] // Errors here
})
})
})