Skip to main content

$reactions.buttons

The function allows you to add buttons to the bot response.

The function gets an object describing the button:

  • text — button name;
  • transition, url — transition path when clicking on the button.
info

Please note that the text key is required for objects passed in the $reactions.buttons function.

How to use
script:
$reactions.buttons("One button")
$reactions.buttons(["One button", "And another in the same line"])
$reactions.buttons({
button: {
text: "Send contact information", // Required
request_contact: true
}
})
$reactions.buttons({
text: "Transition button", // Required
transition: "/state"
})
$reactions.buttons([{
text: "Button 1" // Required
}, {
text: "Button 2", // Required
request_contact: true
}])