Skip to content

Role

This data type describes all available data about the role.

Properties

PropertyTypeDescription
idNumberUnique identifier
nameStringName
iconUrlStringIcon URL
positionNumberPosition number in role list
createdAtDateTimeCreation date and time
permissionsRawNumberPermissions in raw numeric representation
managedBooleantrue if this role is managed by some integration
hoistedBooleantrue if this role is displayed separately from online members
publicRoleBooleantrue if this is public role (@everyone)
colorStringColor in #RRGGBB format
guildGuildServer information

Methods

hasPermission(Name)

Checks if this role has global permission.

Returns: Boolean

hasPermissions(Names)

Checks if this role has global permissions.

Returns: Boolean

hasPermission(Channel, Name)

Checks if this role has permission in channel specified.

Returns: Boolean

hasPermissions(Channel, Names)

Checks if this role has permissions in channel specified.

Returns: Boolean

All rights sniffed.