Skip to content

$newRole

$newRole holds data of a role that was created, updated, or deleted. Used in role update / delete / create events, or else it won’t give any data.

Usage

$newRole[option]

Parameters

FieldTypeDescriptionRequired
optionstringOption to retrieve.true

Options

FieldTypeDescription
nameStringReturns role name
idStringReturns role ID
createdAtStringReturns created date
hexColorStringReturns hex color
membersStringReturns members having the role
createdTimestampNumberReturns created timestamp
memberCountNumberReturns number of members having the role
managedBooleanReturns if role is managed or not
positionNumberReturns role position
permissionsStringReturns permissions of role