ButtonParameter

ButtonParameter

Button Parameter API object

Constructor

new ButtonParameter(param, type)

Source:
Properties:
Name Type Attributes Description
type String The type of the button
text String <optional>
The text of the button
payload String <optional>
The payload of the button
Builds a button parameter for a ButtonComponent
Parameters:
Name Type Description
param String Developer-provided data that is used to fill in the template.
type String The type of the button. Can be either 'text' or 'payload'.
Throws:
  • If param is not provided
    Type
    Error
  • If type is not either 'text' or 'payload'
    Type
    Error