Skip to content

$arrayIncludes

$arrayIncludes will check if a specific item exists in the array.

Usage

$arrayIncludes[name;query]

Parameters

FieldTypeDescriptionRequired
namestringArray name.true
querystringThe element we will be queering for every element inside the array.true

Example(s)

1
client.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
});
1
client.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
});