$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
Field | Type | Description | Required |
---|---|---|---|
…categoryIDs | string, number | Categories you want to limit the command to. | true |
error | string | Error 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:
1client.command({2 name: "onlyForCategories",3 code: `4 Ok.5 $onlyForCategories[categoryID;categoryID;You can't use that command here!]6 `7});