Skip to content
Lists & Helpers ifEmpty

$ifEmpty — Alias of $default: the value, or the fallback when it is empty

Alias of `$default`: the value, or the fallback when it is empty.

Syntax

$ifEmpty[value;fallback]

Parameters

  • value (text, required) — The value to check.
  • fallback (text, required) — Used when the value is empty.

Return Value

  • string.

Usage

$ifEmpty[;none] → "none"

Example

$sendMessage[$ifEmpty[;none]]

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.