$includes
Checks whether given text contains something.
Usage
$includes[text;queries]This function has two params.
Param
Description
Type
Required
text
The text to search for 'queries'
String
Yes
queries
The arguments that 'text' shall contain, separated by ;.
String
Yes
Remember the case of characters in `$includes[]` matters (e.g. searching for a lowercase `h` within `Hello` would return 'false', not 'true'.). You can use [`$toLowerCase[]`](./tolowercase.md) to negate this issue.
Examples
Example #1
bot.commands.add({
type: "basicCommand",
name: "example",
code: `$includes[Hello World!;Hello]` //Returns true
})Example #2
bot.commands.add({
type: "basicCommand",
name: "example",
code: `$includes[DBD.TS is cool!;cool;easy]
$includes[DBD.TS is cool and easy!;cool;easy]
$includes[DBD.TS is easy!;cool;easy]` //All 3 statements would return true
})Example #3
bot.commands.add({
type: "basicCommand",
name: "example",
code: `$includes[Hello Planet;Earth]` //Returns false
})Last updated
Was this helpful?