Skip to content
Variables let

$let — Stores a value in a local variable of the script run.

Stores a value in a local variable of the script run.

Syntax

$let[name;value]

Parameters

  • name (text, required) — Variable name.
  • value (text, required) — Value (JSON stays structured).

Return Value

  • string.

Usage

$let[n;5]$get[n] → "5"

Example

$sendMessage[$let[n;5]$get[n]]

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.