$onlyForRoles
$onlyForRoles will check if the user who executed the command has any of the listed roles and return a error message
if not.
Usage
$onlyForRoles[...roleIDs;error]Parameters
| Field | Type | Description | Required |
|---|---|---|---|
| …roleIDs | string, number | Roles you want to limit the command to. | true |
| error | string | Error to return when the command was not executed by any user with the listed roles. | false |
Example(s)
This will limit the command only to the listed roles:
1client.command({2 name: "onlyForRoles",3 code: `4 Ok.5 $onlyForRoles[roleID;roleID;You can't use that command!]6 `7});