Skip to content
Lists & Helpers listRemove

$listRemove — Removes every occurrence of an item and returns the new list

Removes every occurrence of an item and returns the new list.

Syntax

$listRemove[list;item;(separator)]

Parameters

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

Return Value

  • string: the new list (empty when nothing is left).

Usage

$listRemove[a,b,a;a] → "b"
$listRemove[a;a] → ""

Example

$sendMessage[$listRemove[a,b,a;a]]

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.