import type { ICommand } from "@/types"; import { ActionRowBuilder, ButtonBuilder, type ButtonInteraction, ButtonStyle, type Client, } from "discord.js"; export async function buttonExecute( client: Client, interaction: ButtonInteraction, ) { const message = interaction.message; await interaction.reply({ content: "Thank you.", flags: ["Ephemeral"], }); const agreedButton = new ActionRowBuilder().addComponents( new ButtonBuilder() .setCustomId("report:agreed") .setLabel("I confirm that my report follows the rules") .setDisabled(true) .setStyle(ButtonStyle.Success), ); await message.edit({ content: message.content, components: [agreedButton], }); } export default { buttonExecute, } satisfies ICommand;