Class: ButtonBuilder

ButtonBuilder

A class to simplify creating a Button.

Constructor

new ButtonBuilder(emoji, callback, dataopt)

Creates a ButtonBuilder
Parameters:
Name Type Attributes Default Description
emoji string null The visual representation of the button.
callback ButtonCallback null Callback function to execute when the button is pressed.
data Object <optional>
null Optional data to pass.
Source:

Members

Callback

The callback executed when this button is pressed.
Source:

Data

Optional additional data to pass to this Button's callback.
Source:

Emoji

The emoji that is the visual representation of this Button.
Source:

Methods

SetCallback(callback)

Sets the callback of this Button.
Parameters:
Name Type Description
callback ButtonCallback The callback executed when this button is pressed.
Source:

SetData(data)

Sets the data of this Button.
Parameters:
Name Type Description
data Object Optional additional data to pass to this Button's callback.
Source:

SetEmoji(emoji)

Sets the emoji of this Button.
Parameters:
Name Type Description
emoji string The emoji that is the visual representation of this Button.
Source: