Math & Text
truncate
$truncate — Shortens a text so that it never exceeds a length, suffix included
Shortens a text so that it never exceeds a length, suffix included. `$cropText` is the older equivalent.
Syntax
$truncate[text;max;(suffix)]
Parameters
- text (text, required) — The text.
- max (integer, required) — Maximum length.
- suffix (text, optional) — Added when the text is cut. Default:
….
Return Value
- string.
Usage
$truncate[Hello world;8] → "Hello w…"
Example
$sendMessage[$truncate[Hello world;8]]
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.