Sections

Messages with sections are messages that contain a list in them. Like buttons and the like but this is a list.

First of all we need the 3 functions already provided namely $addSections, $addSectionsDisplayText, and $addSectionsRows.

Functions

$addSections[title]

This "title" will later be used in $addSectionsRows to add a list inside this "title" index.

$addSectionsDisplayText[some text]

Later "some text" will appear visually with the message.

$addSectionsRows[title;rowTitle:rowId:rowDescription;rowTitle:rowId:rowDescription;...]

The first part inside is "title" which refers to the $addSections field earlier. This means that this row will be added to the list of the "title" sections earlier.

💡

You can add more than 1 $addSections so that in the list there is not only 1 index section.

Example

Remember that whatscode.js code runs from the ground up.

bot.command({
name: "sections",
code: `Text is required
$addSectionsRows[title;rowTitle:rowId:rowDescription]
$addSectionsDisplayText[some text]
$addSections[title]`
})