Role class Null safety

Implemented types


client INyxx
Reference to client
color DiscordColor
The role's color, 0 if no color.
late, final
createdAt DateTime
Gets creation timestamp included in Snowflake
read-only, inherited
guild Cacheable<Snowflake, Guild>
Cacheable or guild attached to this role instance
late, final
hashCode int
The hash code for this object. [...]
read-only, inherited
hoist bool
If the role is pinned in the user listing.
late, final
iconEmoji String?
Emoji that represents role. For now emoji data is not validated and this can be any arbitrary string
late, final
iconHash String?
Hash of role icon
late, final
id Snowflake
ID of entity as Snowflake
final, inherited
managed bool
Whether or not the role is managed by an integration.
late, final
mention String
Mention of role. If role cannot be mentioned it returns name of role (@name)
read-only, override
mentionable bool
Whether or not the role is mentionable.
late, final
name String
The role's name.
late, final
permissions Permissions
The role's permissions.
late, final
position int
The role's position.
late, final
roleTags RoleTags?
Additional role data like if role is managed by integration or role is from server boosting.
late, final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited


delete() Future<void>
Deletes the role.
edit(RoleBuilder role, {String? auditReason}) Future<Role>
Edits the role.
iconURL({String format = "webp", int size = 128}) String?
Returns url to role icon
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
toString() String
A string representation of this object. [...]


operator ==(dynamic other) bool
The equality operator. [...]