Properties

new Buttons(body, buttons, title, footer)

Parameters

Name Type Optional Description

body

 

 

buttons

 

 

title

 

 

Value can be null.

footer

 

 

Value can be null.

Properties

body  (string or MessageMedia)

Message body

buttons  Array of Array of string

buttons of message

footer of message

title  string

title of message

Method

_format(buttons) → Array of Array of string

Creates button array from simple array

Example

Input: [{id:'customId',body:'button1'},{body:'button2'},{body:'button3'},{body:'button4'}]
Returns: [{ buttonId:'customId',buttonText:{'displayText':'button1'},type: 1 },{buttonId:'n3XKsL',buttonText:{'displayText':'button2'},type:1},{buttonId:'NDJk0a',buttonText:{'displayText':'button3'},type:1}]

Parameter

Name Type Optional Description

buttons

Array of Array of string

 

Returns

Array of Array of string