$and
$and
will check if all given conditions are true.
Usage
$and[...conditions]
Parameters
Field | Type | Description | Required |
---|---|---|---|
…conditions | string | The conditions you want to check. | true |
Example(s)
This will check if the three given conditions are true
:
$authorId==$authorId
->true
1>=1
->true
$packageVersion==1.0.0
->false
As you can see, one condition is false
.
1client.command({2 name: "and",3 code: `4 $and[$authorId==$authorId;1>=1;$packageVersion==1.0.0]` // returns: false5});
Another example but with it returning true would be:
This will check if the three given conditions are true
:
$authorId==$authorId
->true
1>=1
->true
$packageVersion==6.7.0
->true
As you can see, all conditions are true
.
1client.command({2 name: "and",3 code: `4 $and[$authorId==$authorId;1>=1;$packageVersion==6.7.0]` // returns: true5});