Role class Null safety

Constructors

Role(Snowflake _id, String _label, int _color, bool _hoist, String? _icon, String? _unicodeEmoji, int _position, int _permissions, bool _managed, bool _mentionable, Tag? _tags, GuildRoleManager _manager)
Role.from({required GuildRoleManager roleManager, dynamic payload})
factory

Properties

color int
read-only
hashCode int
The hash code for this object.
read-only, inherited
icon String?
read-only
id Snowflake
read-only
isHoist bool
read-only
isManaged bool
read-only
isMentionable bool
read-only
label String
read-only
manager → GuildRoleManager
read-only
permissions int
read-only
position int
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
tags → Tag?
read-only
unicodeEmoji String?
read-only

Methods

delete() Future<void>
Removes the current this from the MemberRoleManager's cache
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
removeIcon() Future<void>
Remove the icon of the role.
setColor(Color color) Future<void>
Modifies the color of the role.
setHoist(bool hoist) Future<void>
Modifies the hoist of the role from bool.
setIcon(String path) Future<void>
Modifies the icon of the role from String path.
setLabel(String label) Future<void>
Modifies the label of the role.
setMentionable(bool mentionable) Future<void>
Modifies the mentionable of the role from bool.
setPermissions(List<Permission> permissions) Future<void>
Modifies the permissions associated with this
setUnicodeEmoji(String unicode) Future<void>
Define the unicodeEmoji of the role from String.
toString() String
Returns this in discord notification format
override

Operators

operator ==(Object other) bool
The equality operator.
inherited