Skip to main content

$onlyIf

Parameters

FieldTypeDescription
conditionstringThe condition to check.
ifTruestringThe code to execute if the condition is true.
replyMessagebooleanreply to message? (optional).

Usage

This function checks if the condition is true or not

Example

$onlyIf[value==value2;error message]

$onlyIf[value!=value2;error message]

$onlyIf[value>value2;error message]

$onlyIf[value<value2;error message]

$onlyIf[value>=value2;error message]

$onlyIf[value<=value2;error message]

<AoiClient>.addCommand({
name: "special",
code: `Special Command
$onlyIf[15==6;15 doesn't equal 6!]`,
});