Skip to content

$onlyForCategories

$onlyForCategories will check if the command was executed in the category of the execution channel and return a error message if not.

Usage

$onlyForCategories[...categoryIds;error]

Parameters

FieldTypeDescriptionRequired
…categoryIdsstring, numberCategories you want to limit the command to.true
errorstringError to return when the command was not executed in any of the listed categories.true

Example(s)

This will limit the command only to given channel categories:

1
client.command({
2
name: "onlyForCategories",
3
code: `
4
Ok.
5
$onlyForCategories[categoryID;categoryID;You can't use that command here!]
6
`
7
});