Skip to content

$onlyPerms

$onlyPerms will check if the user has the listed permission and return a error message if not.

Usage

$onlyPerms[...perms;error]

Parameters

FieldTypeDescriptionRequired
…permsstringPermission the user requires.true
errorstringError 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:

1
client.command({
2
name: "onlyPerms",
3
code: `
4
Ok.
5
$onlyPerms[administrator;You don't have administrator permissions!]
6
`
7
});