$argsCheck
$argsCheck
will check the arguments of user typed and the required one, if requirements didn’t meet, it will return an
error message.
Usage
$argsCheck[condition;errorMessage]
Parameters
Field | Type | Description | Required |
---|---|---|---|
condition | string | Condition to be made. | true |
errorMessage | string | Error message if condition did not meet. | true |
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 returns: Greater than 2 arguments if condition met, else it will return an error message.
1client.command({2 name: "argsCheck",3 code: `4 You have more than two arguments, nice!5
6 $argsCheck[>2;You have less than two arguments!]7 `8});