Skip to content

$deleteButton

$deleteButton removes a given button component from a given message authored by the bot.

Usage

$deleteButton[messageId;customId;channelId?]

Parameters

FieldTypeDescriptionRequired
messageIdnumberMessage ID corresponding to the message of the button.true
customIdstringCustom ID corresponding to the component.true
channelIdnumberChannel ID corresponding to the message of the button.false

Example(s)

This will send a message with a button and remove the button after doing so:

1
client.command({
2
name: "deleteButton",
3
code: `
4
$deleteButton[$get[messageId];customId]
5
$wait[5s]
6
$let[messageId;$sendMessage[Hello! This is a button. {actionRow:{button:I'm a button!:primary:customId:false}};true]]` // saving the message Id for later!
7
});