Skip to content
Server Helpers userRoleNames

$userRoleNames — Names of the roles a member holds, from the highest to the lowest, without @everyone

Names of the roles a member holds, from the highest to the lowest, without `@everyone`.

Syntax

$userRoleNames[userID;(separator)]

Parameters

  • userID (ID, required) — The member.
  • separator (text, optional) — Default: , .

Return Value

  • string: empty when the user has no role or is not a member.

Usage

$userRoleNames[1] → "Mod, Fan"
$userRoleNames[1;|] → "Mod|Fan"

Important Notes

  • $userRoles returns the names too, one per line; this one lets you pick the separator.

Example

$sendMessage[$userRoleNames[1]]

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.