Math & Text
parseint
$parseInt — Reads the whole number at the start of a text, ignoring what follows.
Reads the whole number at the start of a text, ignoring what follows.
Syntax
$parseInt[value;(fallback)]
Parameters
- value (text, required) — For example
42px. - fallback (text, optional) — Returned when no number starts the text.
Return Value
- string.
Usage
$parseInt[42px] → "42"
$parseInt[-7.9] → "-7"
Example
$sendMessage[$parseInt[12 days]]
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.