$hasRoles

Checks if user has all of the given roles. Returns true or false.

Usage:

$hasRoles[userID;role1;role2;...]
  1. userID - User you want to check for roles.
  2. role N - You can add as many roles as needed.

Example

Using $hasRoles

How to use $hasRoles. Keep in mind that only if the user does have all of listed roles, true will be returned.

User04/23/2025
!!exec $hasRoles[$authorID;123456789123456789]
Custom Command Bot 04/23/2025
true

Suggestion

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

Function difficulty: Easy
Tags: roles management