Lists & Helpers
listJoin
$listJoin — Changes the separator of a list
Changes the separator of a list. This keeps IDs from getting mixed up: turn `1,2,3` into one item per line or into `1 and 2 and 3`.
Syntax
$listJoin[list;sourceSeparator;outputSeparator]
Parameters
- list (text, required) — The items.
- sourceSeparator (text, required) — The separator used in the list. Empty means
,. - outputSeparator (text, required) — The separator to put between the items.
\nmeans a new line.
Return Value
- string.
Usage
$listJoin[1,2,3;,; and ] → "1 and 2 and 3"
$listJoin[1,2;,;\n] → "1" then "2" on two lines
Example
$sendMessage[$listJoin[1,2,3;,; and ]]
Try it
Paste an example into the playground to preview its message (functions that act on Discord are not run), or build the same thing with blocks.