Skip to content

$checkCondition

$checkCondition checks if a condition is either true or false.

Usage

$checkCondition[condition]

Parameters

FieldTypeDescriptionRequired
conditionstringCondition you want to check.true

Valid Mathematical Operators

OperatorMathematical 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 return false as 50 is greater than 25:

1
client.command({
2
name: "checkCondition",
3
code: `
4
$checkCondition[50>25]
5
`
6
});

Advanced Example

Logical conjunction

This will return true as 50 is greater than 25 and 120 is less than 280:

1
client.command({
2
name: "checkCondition",
3
code: `
4
$checkCondition[50>25&&120<280]
5
`
6
});

Logical OR

This will return true as one of the two arguments (50>25) are true:

1
client.command({
2
name: "checkCondition",
3
code: `
4
$checkCondition[50>25||true==false]
5
`
6
});