RoleManager class

A manager for Roles.

Inheritance

Constructors

RoleManager(CacheConfig<Role> config, NyxxRest client, {required Snowflake guildId})
Create a new RoleManager.

Properties

cache Cache<Role>
The cache for this manager.
finalinherited
client NyxxRest
The client this manager belongs to.
finalinherited
guildId Snowflake
The ID of the guild this manager is for.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

create(covariant RoleBuilder builder, {String? auditLogReason}) Future<Role>
Create a new instance of the type of this manager.
override
delete(Snowflake id, {String? auditLogReason}) Future<void>
Delete the item with the given id from the API.
override
fetch(Snowflake id) Future<Role>
Fetch the item with the given id from the API.
override
get(Snowflake id) Future<Role>
Get an item by its id from the cache if it exists, else fetch it from the API.
inherited
list() Future<List<Role>>
List the roles in this guild.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parse(Map<String, Object?> raw) Role
Parse the raw data received from the API into an instance of the type of this manager.
override
parseRoleTags(Map<String, Object?> raw) RoleTags
Parse RoleTags from raw.
toString() String
A string representation of this object.
inherited
update(Snowflake id, covariant RoleUpdateBuilder builder, {String? auditLogReason}) Future<Role>
Update the item with the given id in the API.
override
updatePositions(Map<Snowflake, int> positions, {String? auditLogReason}) Future<List<Role>>
Update the positions of the roles in this guild.

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](Snowflake id) PartialRole
Return a partial instance of the entity with ID id containing no data.
override