Skip to content
Control Flow case

$case — Adds a switch case

Adds a switch case

Syntax

$case[value;code]

Parameters

  • value (text, required) — The match case
  • code (text, required) — Code to execute if it matches this case

Return Value

  • Unknown.

Usage

$case[value;code] → result

Example

$sendMessage[$switch[a;$case[a;one]$case[b;two]]]

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.