Discord Bot BaseResponders
Buttons
how to reply discord buttons
Reply to a button by setting the Responder
type to button.
const row = createRow(
new ButtonBuilder({
customId: "/confirm/button",
label: "Confirm",
style: ButtonStyle.Success
})
);
interaction.reply({ flags: ["Ephemeral"], components: [row] });
createResponder({
customId: "/confirm/button",
types: [ResponderType.Button], cache: "cached",
async run(interaction) {
interaction.update({
flags: ["Ephemeral"], content: "Confirmed",
components: []
});
},
});