$random
$random
will generate a random number between your chosen span.
Usage
$random[num1;num2;allow?;random?]
Parameters
Field | Type | Description | Required |
---|---|---|---|
num1 | number | Start of the span. | true |
num2 | number | End of the span. | true |
allow? | boolean | Allows returning of decimal numbers. | false |
random? | boolean | If the returned number will be random. | false |
Example(s)
This will return a random number between 20
and 250
:
1client.command({2 name: "random",3 code: `4 $random[20;250]5 `6});
Advanced Example
This will return a random decimal number between 25
and 50
:
1client.command({2 name: "random",3 code: `4 $random[25;50;true]5 `6});
This will return a random number between 45
and 64
and the second $random
will be random as well:
1client.command({2 name: "random",3 code: `4 $random[45;65;false;true]5 $random[45;65;false;true]6 `7});