Skip to content

$ifAwaited

$ifAwaited will check a condition and executed an awaited command depending on the condition being true or false.

Usage

$ifAwaited[condition;true;false?]

Parameters

FieldTypeDescriptionRequired
conditionstringCondition to checktrue
truestringWhat to do when the condition is true.true
false?stringWhat to do when the condition is false.false

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 execute the awaitedCommand awaited command as the statement is true:

1
client.command({
2
name: "ifAwaited",
3
code: `
4
$ifAwaited[1==1;{execute:awaitedCommand}]
5
`
6
});
7
8
client.awaitedCommand({
9
name: "awaitedCommand",
10
code: `
11
$sendMessage[That's true!;false]
12
`
13
});