Skip to content

MessageButton

A class representing a message button.

Kind: global class

Creates a new message button instance.

ParamTypeDescription
[data]ObjectThe data to initialize the message button with.

Sets the label of the button.

Kind: instance method of MessageButton
Returns: MessageButton - The message button instance.

ParamTypeDescription
labelstringThe label to set.

Sets the custom ID of the button.

Kind: instance method of MessageButton
Returns: MessageButton - The message button instance.

ParamTypeDescription
customIdstringThe custom ID to set.

Sets whether the button is disabled.

Kind: instance method of MessageButton
Returns: MessageButton - The message button instance.

ParamTypeDescription
disabledbooleanWhether the button is disabled.

Sets the style of the button.

Kind: instance method of MessageButton
Returns: MessageButton - The message button instance.

ParamTypeDescription
stylestringThe style to set.

Sets the URL of the button.

Kind: instance method of MessageButton
Returns: MessageButton - The message button instance.

ParamTypeDescription
urlstringThe URL to set.

Sets the emoji of the button.

Kind: instance method of MessageButton
Returns: MessageButton - The message button instance.

ParamTypeDescription
emojistring | ObjectThe emoji to set.

Converts the message button instance to a JSON representation.

Kind: instance method of MessageButton
Returns: Object - The JSON representation of the message button.