Randomize
Table of Contents
{random-text}
— Randomly selects one of a couple different phrases.{random-coinflip}
— Simulates flipping a coin.{random-number}
— Generates a random number within a specified range.
{random-text}
Randomly selects one of a couple different phrases. Can be used to randomize a greeting or another part of a snippet.
Settings
Setting | Required | Type | Description |
---|---|---|---|
positional | yes | Ordered List | The phrases you want to randomize between. |
Example Usage
If you're replying to an email you can randomize your greeting.
{random-text: Hi, Hello, Howdy, Hey there} John
{random-coinflip}
Simulates flipping a coin. Returns yes 50% of the time, and no 50% of the time (this probability is configurable).
Settings
Setting | Required | Type | Description |
---|---|---|---|
probability | no | Number | The percentage probability of a yes, defaults to 50%. |
Example Usage
Use this command if you'd like to randomly show and hide content in combination with the {if} command.
{show={random-coinflip}}
{if: show}
Randomly show some content.
{else}
Do not show.
{endif}
{random-number}
Generates a random number within a specified range.
Settings
Setting | Required | Type | Description |
---|---|---|---|
min | yes | Number | The minimum value for the random number. |
max | yes | Number | The maximum value for the random number. |
rounded | no | yes/no | Whether the random number should be rounded to the nearest whole number. |