Math & Text
clamp
$clamp — Keeps a number between a minimum and a maximum.
Keeps a number between a minimum and a maximum.
Syntax
$clamp[number;min;max]
Parameters
- number (number, required) — The number.
- min (number, required) — Lower bound.
- max (number, required) — Upper bound. Must not be below the minimum.
Return Value
- string.
Usage
$clamp[15;0;10] → "10"
Example
$sendMessage[$clamp[$message[1];1;100]]
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.