EntitlementManager

export class EntitlementManager extends CachedManager<Snowflake, Entitlement, EntitlementResolvable>
export class EntitlementManager extends CachedManager<Snowflake, Entitlement, EntitlementResolvable>
Manages API methods for entitlements and stores their cache.
Readonly
cache:Collection<Key, Holds>
The cache of items for this manager.
Inherited from DataManager
Readonly
client:Client
The client that instantiated this Manager
Inherited from BaseManager
Readonly
holds:Constructable<Holds>
The data structure belonging to this manager.
Inherited from DataManager
consume(entitlementId):Promise<void>
Marks an entitlement as consumed Only available for One-Time Purchase consumable SKUs.
NameTypeOptionalDescription
entitlementIdSnowflakeNoThe id of the entitlement to consume
createTest(options):Promise<Entitlement>
Creates a test entitlement
NameTypeOptionalDescription
optionsGuildEntitlementCreateOptions | UserEntitlementCreateOptionsNoOptions for creating the test entitlement
deleteTest(entitlement):Promise<void>
Deletes a test entitlement
NameTypeOptionalDescription
entitlementEntitlementResolvableNoThe entitlement to delete
Fetches entitlements for this application
NameTypeOptionalDescription
optionsFetchEntitlementsOptionsYesOptions for fetching the entitlements
resolve(idOrInstance):Holds
Resolves a data entry to a data Object.
Returns
An instance from this Manager
NameTypeOptionalDescription
idOrInstanceHoldsNoThe id or instance of something in this Manager
resolveId(idOrInstance):Key
Resolves a data entry to an instance id.
Returns
NameTypeOptionalDescription
idOrInstanceKey | HoldsNoThe id or instance of something in this Manager
valueOf():Collection<Key, Holds>