$onlyIf
$onlyIf will check for a condition and return a error message if that condition does not match.
Usage
$onlyIf[condition;error]Parameters
| Field | Type | Description | Required |
|---|---|---|---|
| condition | string | Condition to check. | true |
| error | string | Error to return when condition does not match. | false |
Example(s)
This will return the error message as 5 does not equal to 3:
1client.command({2 name: "onlyIf",3 code: `4 Ok.5 $onlyIf[5==3;That's wrong!]6 `7});