Skip to main content

$reactions.inlineButtons

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

caution
Only certain channels support inline buttons.

By clicking on the inline button, data or URL (callback_data or URL, respectively) can be transmitted. Also, inline buttons are displayed not under the dialog, but inside it in the form of chatbots replies.

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.inlineButtons function.

How to use
$reactions.inlineButtons({
text: button_name, // Required
callback_data: variations[i].id
});
$reactions.inlineButtons({
text:"info. distribution (on)", // Required
callback_data: "Enable distribution"
});
$reactions.inlineButtons({
text:"Program changes (on)", // Required
callback_data: "Enable notification"
});