Skip to content

$oldRole

$oldRole holds data of the role before it was updated, used in role update event, or else any data will be empty.

Usage

$oldRole[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