$(random)
$(random <min> [max])
Displays a random whole number, both ends inclusive. With a single value it rolls 1 to max, like a die.
The number is rolled once each time the template resolves: once per run in a flow, and again when the underlying data changes in an overlay (not 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!"