Math & Text
percent
$percent — Percentage that part makes of total.
Percentage that `part` makes of `total`.
Syntax
$percent[part;total;(decimals)]
Parameters
- part (number, required) — The part.
- total (number, required) — The total. Zero raises an error.
- decimals (integer, optional) — From 0 to 10. Default 0.
Return Value
- string.
Usage
$percent[1;3;1] → "33.3"
Example
$sendMessage[$percent[$getUserVar[xp];1000]%]
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.