Functionalities
Other
$commandContains
Returns `true` if the command contains the content in the 2nd field. Otherwise, function returns `false`. 3rd field indicates if the function will read everything case sensitive.
Some functions may break in this function. Try using the function name without the $ if this occurs.

FUNCTION USAGE

  • $commandContains[cmd;content]
  • $commandContains[cmd;content;sensitive]

Properties:

cmd - The command the function will be looking through. content - The content the function will be searching for in the command. sensitive - If true or yes, the function will look for the exact content with case sensitivity. If false or no, the function will look for the exact content without case sensitivity. Defaults to true.
Example 1: Returns true since an $channelType is used in the command.
1
bot.Command({
2
name: "test",
3
code: `
4
$channelType[$channelID]
5
6
$commandContains[$commandName;$channelType]
7
`
8
})
Copied!
Example 2: Returns false since no $channelType is used in the command.
1
bot.Command({
2
name: "test",
3
code: `
4
$commandContains[$commandName;$channelType]
5
`
6
})
Copied!
Example 3: Returns true since an $channelType is used in the command and the 3rd field indicates the function will not read case sensitive.
1
bot.Command({
2
name: "test",
3
code: `
4
$channelType[$channelID]
5
6
$commandContains[$commandName;$channeltype;no]
7
`
8
})
Copied!
Last modified 6mo ago
Copy link
Contents
Properties: