Button

Button

new Button(labelopt, coloropt, payloadopt) → {Button}

Source:
Parameters:
Name Type Attributes Default Description
label string <optional>
"Button"

button label

color string <optional>
"default"

button color

payload string <optional>
""

button payload, see VK bots docs -> Section 4.3 for more details

Returns:
Type:
Button
Example
new Button('Default')
new Button('Default', colors.default)
new Button('Default', colors.default, {a: "b"})

new Button('Primary', colors.primary)
new Button('Negative', colors.negative)
new Button('Positive', colors.positive)

Members

(static) this.action :Object

This button's action

Source:
Type:
  • Object

(static) this.action.payload :string

This button's payload

Source:
Type:
  • string

(static) this.color :string

This button's color

Source:
Type:
  • string