EntitlementManager class

Inheritance

Constructors

EntitlementManager(CacheConfig<Entitlement> config, NyxxRest client, {required Snowflake applicationId})
Create a new EntitlementManager.

Properties

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

Methods

createTestEntitlement(TestEntitlementBuilder builder) Future<Entitlement>
Create a test entitlement that never expires.
deleteTestEntitlement(Snowflake id) Future<void>
Delete a test entitlement.
fetch(Snowflake id) Future<Entitlement>
Fetch the item with the given id from the API.
override
get(Snowflake id) Future<Entitlement>
Get an item by its id from the cache if it exists, else fetch it from the API.
inherited
list({Snowflake? userId, List<Snowflake>? skuIds, Snowflake? before, Snowflake? after, int? limit, Snowflake? guildId, bool? excludeEnded}) Future<List<Entitlement>>
List all the entitlements for this application.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parse(Map<String, Object?> raw) Entitlement
Parse the raw data received from the API into an instance of the type of this manager.
override
toString() String
A string representation of this object.
inherited

Operators

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