MessageButton
MessageButton
A class representing a message button.
Kind: global class
new MessageButton([data])
Creates a new message button instance.
Param | Type | Description |
---|---|---|
[data] | Object | The data to initialize the message button with. |
messageButton.setLabel(label) ⇒ MessageButton
Sets the label of the button.
Kind: instance method of MessageButton
Returns: MessageButton
- The message button instance.
Param | Type | Description |
---|---|---|
label | string | The label to set. |
messageButton.setCustomId(customId) ⇒ MessageButton
Sets the custom ID of the button.
Kind: instance method of MessageButton
Returns: MessageButton
- The message button instance.
Param | Type | Description |
---|---|---|
customId | string | The custom ID to set. |
messageButton.setDisabled(disabled) ⇒ MessageButton
Sets whether the button is disabled.
Kind: instance method of MessageButton
Returns: MessageButton
- The message button instance.
Param | Type | Description |
---|---|---|
disabled | boolean | Whether the button is disabled. |
messageButton.setStyle(style) ⇒ MessageButton
Sets the style of the button.
Kind: instance method of MessageButton
Returns: MessageButton
- The message button instance.
Param | Type | Description |
---|---|---|
style | string | The style to set. |
messageButton.setURL(url) ⇒ MessageButton
Sets the URL of the button.
Kind: instance method of MessageButton
Returns: MessageButton
- The message button instance.
Param | Type | Description |
---|---|---|
url | string | The URL to set. |
messageButton.setEmoji(emoji) ⇒ MessageButton
Sets the emoji of the button.
Kind: instance method of MessageButton
Returns: MessageButton
- The message button instance.
Param | Type | Description |
---|---|---|
emoji | string | Object | The emoji to set. |
messageButton.toJSON() ⇒ Object
Converts the message button instance to a JSON representation.
Kind: instance method of MessageButton
Returns: Object
- The JSON representation of the message button.