class
List
Source: structures/
Message type List
Properties
Method
new List(body, buttonText, sections, title, footer)
Parameters
Name | Type | Optional | Description |
---|---|---|---|
body |
|
|
|
buttonText |
|
|
|
sections |
|
|
|
title |
|
|
Value can be null. |
footer |
|
|
Value can be null. |
Properties
buttonText string
List button text
description string
Message body
footer string
footer of message
Whatsapp電腦版 網頁版sections Array of any
sections of message
title string
title of message
Method
_format(sections) → Array of any
Creates section array from simple array
Example
Input: [{title:'sectionTitle',rows:[{id:'customId', title:'ListItem2', description: 'desc'},{title:'ListItem2'}]}}]
Returns: [{'title':'sectionTitle','rows':[{'rowId':'customId','title':'ListItem1','description':'desc'},{'rowId':'oGSRoD','title':'ListItem2','description':''}]}]
Parameter
Name | Type | Optional | Description |
---|---|---|---|
sections |
Array of any |
|
- Returns
-
Array of any