Skip to content

$onlyIf

$onlyIf will check for a condition and return a error message if that condition does not match.

Usage

$onlyIf[condition;error]

Parameters

FieldTypeDescriptionRequired
conditionstringCondition to check.true
errorstringError to return when condition does not match.false

Example(s)

This will return the error message as 5 does not equal to 3:

1
client.command({
2
name: "onlyIf",
3
code: `
4
Ok.
5
$onlyIf[5==3;That's wrong!]
6
`
7
});