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
createdAt DateTime
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({String? reason}) 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({String? reason}) Future<void>
Remove the icon of the role.
setColor(Color color, {String? reason}) Future<void>
Modifies the color of the role.
setHoist(bool hoist, {String? reason}) Future<void>
Modifies the hoist of the role from bool.
setIcon(String path, {String? reason}) Future<void>
Modifies the icon of the role from String path.
setLabel(String label, {String? reason}) Future<void>
Modifies the label of the role.
setMentionable(bool mentionable, {String? reason}) Future<void>
Modifies the mentionable of the role from bool.
setPermissions(List<ClientPermission> permissions, {String? reason}) Future<void>
Modifies the permissions associated with this
setUnicodeEmoji(String unicode, {String? reason}) 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