$checkContains
Returns `true` if the message contains any one of the provided words or arguments. Otherwise, function returns `false`.

FUNCTION USAGE:

  • $checkContains[message;word1;word2;etc....]

Properties:

message - The message/arguments the function will look through to find the given words/arguments word - Words/arguments the function will look for in the message.
Example 1 - In this example, the output will be true only if the words hi, hello or hey are used somewhere in the message.
1
bot.Command({
2
name: "check",
3
code: `
4
$checkContains[$message[];hi;hello;hey]
5
`
6
})
Copied!
Example 2 - In this example, the $onlyIf is working with $checkContains to limit the command from being executed if the message does not contain one of the words.
1
bot.Command({
2
name: "hi",
3
code: `
4
Hi, how are you doing?
5
$onlyIf[$checkContains[$message[];hi;hello;hey]==true;You must say either hi, hello or hey somewhere in the command]
6
`
7
})
Copied!
Last modified 5mo ago
Copy link
Contents
Properties: