$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.

User04/23/2025
!!exec I have managechannels OR manageroles permission: $hasAnyPerm[managechannels;manageroles]
Custom Command Bot 04/23/2025
I have managechannels OR manageroles permission: true
User04/23/2025
!!exec I have managechannels permission: $hasAnyPerm[managechannels], I have manageroles permission: $hasAnyPerm[manageroles]
Custom Command Bot 04/23/2025
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.

Function difficulty: Easy
Tags: permission management