Role class

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
no setter
hashCode int
The hash code for this object.
no setterinherited
icon String?
no setter
id Snowflake
no setter
isHoist bool
no setter
isManaged bool
no setter
isMentionable bool
no setter
label String
no setter
manager → GuildRoleManager
no setter
permissions int
no setter
position int
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tags → Tag?
no setter
unicodeEmoji String?
no setter

Methods

delete() Future<void>
Removes the current this from the MemberRoleManager's cache
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent 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