Lists & Helpers
duration
$duration — Writes a number of seconds in a readable way
Writes a number of seconds in a readable way.
Syntax
$duration[seconds;(style)]
Parameters
- seconds (integer, required) — The duration in seconds.
- style (
short,longorcompact, optional) —short(default):2 h 5 min.long:2 hours 5 minutes.compact:2h5m.
Return Value
- string.
Usage
$duration[7500] → "2 h 5 min"
$duration[7503;long] → "2 hours 5 minutes 3 seconds"
$duration[3661;compact] → "1h1m1s"
Example
$sendMessage[$duration[7500]]
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.