$deleteButton
$deleteButton
removes a given button component from a given message authored by the bot.
Usage
$deleteButton[messageId;customId;channelId?]
Parameters
Field | Type | Description | Required |
---|---|---|---|
messageId | number | Message ID corresponding to the message of the button. | true |
customId | string | Custom ID corresponding to the component. | true |
channelId | number | Channel 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:
1client.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});