$arrayIncludes
$arrayIncludes
will check if a specific item exists in the array.
Usage
$arrayIncludes[name;query]
Parameters
Field | Type | Description | Required |
---|---|---|---|
name | string | Array name. | true |
query | string | The element we will be queering for every element inside the array. | true |
Example(s)
1client.command({2 name: "array-includes",3 code: `4 $arrayIncludes[array;Leref]5 $createArray[array;aoi.js;akarui;documents;bot]6 `7 // It will return "false" as it doesn't contain the word "Leref".8});
1client.command({2 name: "array-includes",3 code: `4 $arrayIncludes[array;akarui]5 $createArray[array;aoi.js;akarui;documents;bot]6 `7 // It will return "true" as it contains the word "akarui".8});