Custom Command
FunctionsMember Functions

$hasAnyPerm

Checks if a user has one of the given permissions. Returns true or false.

Usage

$hasAnyPerm[userID;permission1;permission2;...]
  1. userID - (Optional) default value: $authorID. If not included or left empty, $authorID will be used.
  2. permission N - You can add as many permissions as needed. The available permissions are here: Permissions List.

Example

Using $hasAnyPerm

How to use $hasAnyPerm without user argument. Keep in mind that if the user does have only one of listed permissions, true will be returned.

Member
9/5/2026

!!exec I have managechannels OR manageroles permission: $hasAnyPerm[managechannels;manageroles]

Custom Command
APP
9/5/2026

I have managechannels OR manageroles permission: true

Member
9/5/2026

!!exec I have managechannels permission: $hasAnyPerm[managechannels], I have manageroles permission: $hasAnyPerm[manageroles]

Custom Command
APP
9/5/2026

I have managechannels permission: true, I have manageroles permission: false

Suggestion

To make code stop if the user doesn't have the needed permission, you can check out $onlyIf. For multiple actions, check $if.

Related Functions: $hasPerms $hasAnyRole $hasRole

Function difficulty: Easy

Tags: permission management

On this page