Skip to main content

$(random)

$(random <min> [max])

Displays a random whole number, both ends inclusive. With a single value it rolls 1 to max — dice semantics.

The number is rolled once each time the template resolves — in a flow that's once per run; in an overlay it re-rolls when the underlying data changes (it does not re-roll every second).

Examples

$(random 6)

Will display 1, 2, 3, 4, 5 or 6

$(random 10 99)

Will display a number between 10 and 99

{{username}} rolls a $(random 20)!

Will display e.g. "NightBot rolls a 17!"