Skip to content
Lists & Helpers listAdd

$listAdd — Adds an item at the end of a list and returns the new list

Adds an item at the end of a list and returns the new list.

Syntax

$listAdd[list;item;(separator)]

Parameters

  • list (text, required) — The items; may be empty.
  • item (text, required) — The item to add.
  • separator (text, optional) — The text between two items. Default: ,. \n means a new line.

Return Value

  • string: the new list.

Usage

$listAdd[a,b;c] → "a,b,c"
$listAdd[;c] → "c"

Example

$sendMessage[$listAdd[a,b;c]]

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.