MessageButton
A class representing a message button.
Kind: global class
new MessageButton([data])
Section titled “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
Section titled “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
Section titled “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
Section titled “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
Section titled “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
Section titled “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
Section titled “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
Section titled “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.