buttonClicked
Run your code ehwn somebody clicks on a button
Last updated
Was this helpful?
Run your code ehwn somebody clicks on a button
Last updated
Was this helpful?
Was this helpful?
client.on("commandExecuted", cmd => {
console.log(cmd)
// Source...
})
The id of the button
The guild object where the button got pressed
The channel object where the button got pressed
The object of the guild member who pressed the button
The whole interaction that Discord provides
Let the bot thinking
Reply to the interaction with a string, MessageEmbed or components
// Send a text
cmd.reply("Hello world!")
// Send an embed
cmd.reply(myEmbed)
// Send a text and an embed
cmd.reply({
content: "Hello world!",
embeds: [myEmbed] // embed: myEmbed
})
// Send a text, and embed and components
cmd.reply({
content: "Hello world!",
embed: myEmbed,
components: [...]
})
Edit your responded message ( see reply() )
Delete the responded message ( reply() / callback.edit() )
The error message from Discord
{message: "Ok"}