$onlyIf
If the condition between value1 and value2 are `false`, the command will not be executed and the function will send the error message. Otherwise, the command will execute.

FUNCTION USAGE

    $onlyIf[value1{OPERATOR}value2;error]

Properties:

value1 - The first value to compare to the second value. value2 - The second value to compare to the first value. {operator} - The symbol to compare the 2 values. Must not have spaces between the values and/or operator! error - The error to send to the channel if the condition does not meet. {execute} function can be used in the error message to execute another command on error.

Operators(6):

== - value 1 is equal to value 2 != - value 1 is not equal to value 2 > - value 1 is greater than value 2 >= - value 1 is greater than or equal to value 2 < - value 1 is less than value 2 <= - value 1 is less than or equal to value 2

Example:

1
bot.Command({
2
name: "kill",
3
code: `
4
Sucessfully executed the test command!
5
$onlyIf[$authorID!=485670387402646635;You are not $username[485670387402646635]!]
6
`})
Copied!
Last modified 3mo ago
Copy link