Skip to content

$editButton

$editButton will edit an existing button.

Usage

$editButton[customId;label;style;disabled?;emoji?;messageId?;channelId?]

Parameters

FieldTypeDescriptionRequired
customIdstringThe custom ID of the button you wish to edit.true
labelstringThe text that will be displayed on the button as label.true
stylestringThe button style.true
disabled?booleanMake the button unusable/disabled?
1. true
2. false (default)
false
emoji?stringThe emoji displayed in the button.false
messageId?numberThe Id of the message.true
channelId?numberThe channel Id of where the message is located.true

Button Types

Name Value Color
Primary 1 blurple $addButton[1;Example Button!;primary;customID;false]
Secondary 2 grey $addButton[1;Example Button!;secondary;customID;false]
Success 3 green $addButton[1;Example Button!;success;customID;false]
Danger 4 red $addButton[1;Example Button!;danger;customID;false]
Link 5 grey, navigates to a URL $addButton[1;Example Button!;link;https://discord.gg;false]
Custom Emoji any any $addButton[1;Example Button!;link;customID;false;emojiName/emojiId/emojiString]
Unicode Emoji any any $addButton[1;Example Button!;link;customID;false;😀]

Example(s)

This adds a primary and link button to the bot’s message:

1
client.command({
2
name: "editButton",
3
code: `
4
Hello!
5
$addButton[1;Example Button!;primary;exampleButton;false;💔]
6
`
7
});
1
module.exports = [
2
{
3
name: "exampleButton",
4
type: "interaction",
5
prototype: "button",
6
code: `
7
$editButton[exampleButton;New Button!;secondary;true;😀;$interactionData[message.id];$interactionData[channel.id]]
8
$interactionReply[The button just changed!]`
9
}
10
];