Skip to content

$or

$or will check if one of the given conditions is true.

Usage

$or[...conditions]

Parameters

FieldTypeDescriptionRequired
…conditionsstringThe conditions you want to check.true

Example(s)

This will check if the two of three given conditions are true:

  1. $authorId==$authorId -> true
  2. 1>=1 -> true
  3. $packageVersion==1.0.0 -> false

As you can see, one condition is false.

1
client.command({
2
name: "or",
3
code: `
4
$or[$authorId==$authorId;1>=1;$packageVersion==1.0.0]` // returns: true
5
});

Another example but with it returning false would be:

This will check if the three given conditions are true:

  1. $authorId==$channelId -> false
  2. 1!=1 -> false
  3. $packageVersion==1.0.0 -> false

As you can see, all conditions are false.

1
client.command({
2
name: "or",
3
code: `
4
$or[$authorId==$channelId;1!=1;$packageVersion==1.0.0]` // returns: false
5
});