Skip to content
Server Helpers getRolesWithoutPerm

$getRolesWithoutPerm — Lists the IDs of the roles that do NOT have a permission

Lists the IDs of the roles that do NOT have a permission. The opposite of `$getRolesWithPerm`.

Syntax

$getRolesWithoutPerm[permission;(separator);(guildID);(includeAdmin)]

Parameters

  • permission (text, required) — Same as $getRolesWithPerm.
  • separator (text, optional) — Default: ,.
  • guildID (ID, optional) — Default: the current server.
  • includeAdmin (yes or no, optional) — yes (default): Administrator roles count as having the permission, so they are not listed.

Return Value

  • string: the role IDs, or empty.

Usage

$getRolesWithoutPerm[manageMessages] → "50,40,10"

Example

$sendMessage[$getRolesWithoutPerm[manageMessages]]

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.