Skip to content
Lists & Helpers listCount

$listCount — Counts the items of a list

Counts the items of a list. An empty list has 0 items.

Syntax

$listCount[list;(separator)]

Parameters

  • list (text, required) — The items joined by the separator.
  • separator (text, optional) — The text between two items. Default: ,. \n means a new line.

Return Value

  • number.

Usage

$listCount[a,b,c] → "3"
$listCount[] → "0"
$listCount[a|b;|] → "2"

Important Notes

  • Lists are plain text: nothing is stored between two calls.

Example

$sendMessage[$listCount[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.