$usersWithRole

Returns a list of users who have the given role.

Usage

$usersWithRole[roleID;separator;type]
  1. roleID - (Optional) default value: (users without any roles). The ID of a role you want to retrive users with.
  2. separator - (Optional) default value: #NL# (newline). The separator used for creating user list.
  3. type - (Optional) default value: tag. Can be tag, username, id or mention.

Example

Using $usersWithRole

How to use $usersWithRole

User04/23/2025
!!exec $usersWithRole[;, ;username]
Custom Command Bot 04/23/2025
user, user1, user2

Cache

This function works on the bot's cache to find members. If the user is not cached, the function will not find them. User will be cached after they trigger any command from this bot, but eventually they will get deleted.
To have all members cached, you will need Tier 5 Bot.

Function difficulty: Easy
Tags: Roles Has Roles