$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

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?