Back to Whatsapp Web Js

whatsapp

docs/Buttons.html

1.34.71.4 KB
Original Source

Properties

bodybuttons

footertitle

Method

_format(buttons)

Parameters

NameTypeOptionalDescription

body

|

|

| | |

buttons

|

|

|

See ButtonSpec

| |

title

|

|

|

Value can be null.

| |

footer

|

|

|

Value can be null.

|

Properties

body (string or MessageMedia)

Message body

buttons Array of FormattedButtonSpec

buttons of message

footer of message

title string

title of message

Method

_format(buttons) → Array of FormattedButtonSpec

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

NameTypeOptionalDescription

buttons

|

Array of ButtonSpec

|

| |

Returns

Array of FormattedButtonSpec