$addButton
Adds a button to a message.
Syntax
$addButton[New row?;Interaction ID/URL;Label;Style;(Disable?;Emoji;Message ID)]
Parameters
New row?
(Type: Bool || Flag: Required)
: If set toyes
, the button will appear in a new row. If set tono
, the button will appear in the same row as the previous button.
Interaction ID/URL
(Type: String, URL || Flag: Required)
: Depending on the button type, you either set it toInteraction ID
which is then used in$onInteraction[ID]
callback orURL
if it’s a link button.
1. Interactive buttons can’t have duplicated ID
’s in the same message. So for example, you can’t have two buttons with the ID set to test
.
2. If URL
is used in the Interaction ID/URL
argument, it has to start with http://
or https://
.
Label
(Type: String || Flag: Emptiable)
: The text value visible on the button.Style
(Type: Enum || Flag: Required)
: It’s used to specify the button’s background color. If the button has a link/URL, you have to set the value tolink
. Check this section for more details.Disable?
(Type: Bool || Flag: Vacantable)
: If set toyes
, the button can’t be pressed. Defaults tono
.Emoji
(Type: Emoji || Flag: Vacantable)
: Adds an emoji inside the button. Emojis have to be either pasted as unicode, alias or be in the following format<:emoji name:emoji ID>
.Message ID
(Type: Snowflake || Flag: Vacantable)
: Adds the button to the provided message ID. It’s important to note that the provided message ID author has to be the bot.
Button Style
Buttons can have different styles (background colors).
Here, are all possible values for the style
function argument.
primary
- Blue buttonsecondary
- Gray buttonsuccess
- Green buttondanger
- Red buttonlink
- Redirect button
Example
$nomention
Hello
$addButton[no;test;Say hello!;primary;no;]
For more information, read the the Buttons Guide.