$onlyPerms
$onlyPerms
will check if the user has the listed permission and return a error message if not.
Usage
$onlyPerms[...perms;error]
Parameters
Field | Type | Description | Required |
---|---|---|---|
…perms | string | Permission the user requires. | true |
error | string | Error to return when the user has not the listed permissions. | true |
You can find all permissions here.
Example(s)
This will limit the command to work only when the user has administrator permissions:
1client.command({2 name: "onlyPerms",3 code: `4 Ok.5 $onlyPerms[administrator;You don't have administrator permissions!]6 `7});