$ifAwaited
$ifAwaited will check a condition and executed an awaited command depending on the condition being true or false.
Usage
$ifAwaited[condition;true;false?]Parameters
| Field | Type | Description | Required |
|---|---|---|---|
| condition | string | Condition to check | true |
| true | string | What to do when the condition is true. | true |
| false? | string | What to do when the condition is false. | false |
Valid Mathematical Operators
| Operator | Mathematical Expression |
|---|---|
| == | equal to |
| != | not equal to |
| <= | less than or equal to |
| >= | greater than or equal to |
| > | greater than |
| < | less than |
| || | logical OR |
| && | logical conjunction |
Example(s)
This will execute the awaitedCommand awaited command as the statement is true:
1client.command({2 name: "ifAwaited",3 code: `4 $ifAwaited[1==1;{execute:awaitedCommand}]5 `6});7
8client.awaitedCommand({9 name: "awaitedCommand",10 code: `11 $sendMessage[That's true!;false]12 `13});