Entity Info
roleMembersList
$roleMembersList
$roleMembersList returns the members of the current server who hold a given role.
Syntax
$roleMembersList[Role ID;(Separator;Return)]
Parameters
| Parameter | Description |
|---|---|
Role ID |
Required. The role ID (positive integer, otherwise “Invalid role ID.”). |
Separator |
Optional. Text placed between entries. Default: , . |
Return |
Optional. id (default, also when empty), mention (<@id>) or username. Any other value raises “Return must be id, mention or username.”. |
Return value
- The matching members joined by the separator; an empty string if nobody has the role.
Examples
Mentions, one per line
Members: $roleMembersList[123456789012345678;\n;mention]
IDs
$roleMembersList[123456789012345678]
Try it
Paste an example into the playground to preview its message (functions that act on Discord are not run), or build the same thing with blocks.