Skip to content
Lists & Helpers listSum

$listSum — The sum of a list of numbers

The sum of a list of numbers. An empty list gives an empty text.

Syntax

$listSum[list;(separator)]

Parameters

  • list (text, required) — Numbers joined by the separator. Text that is not a number raises an error.
  • separator (text, optional) — The text between two items. Default: ,. \n means a new line.

Return Value

  • number.

Usage

$listSum[3,9,2.5]

Example

$sendMessage[$listSum[3,9,2.5]]

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.