class Entitlement

extends

Base
export class Entitlement extends Base

Represents an Entitlement

applicationId : Snowflake

The id of the parent application

readonly
client : Client<true>

The client that instantiated this

Inherited from: Base

consumed : boolean

Whether this entitlement has been consumed

deleted : boolean

Whether this entitlement was deleted

readonly
endsAt : Date | null

The end date at which this entitlement is no longer valid

endsTimestamp : number | null

The timestamp at which this entitlement is no longer valid

readonly
guild : Guild | null

The guild that is granted access to this entitlement's SKU

guildId : Snowflake | null

The id of the guild that is granted access to this entitlement's SKU

id : Snowflake

The id of the entitlement

skuId : Snowflake

The id of the associated SKU

readonly
startsAt : Date | null

The start date at which this entitlement is valid

startsTimestamp : number | null

The timestamp at which this entitlement is valid

The type of this entitlement

userId : Snowflake

The id of the user that is granted access to this entitlement's SKU

consume() : Promise<void>

Marks this entitlement as consumed Only available for One-Time Purchase consumable SKUs.

fetchUser() : Promise<User>

Fetches the user that is granted access to this entitlement's SKU

isActive() : boolean

Indicates whether this entitlement is active

isGuildSubscription() : this is this & { guild: Guild; guildId: Snowflake }

Indicates whether this entitlement is a guild subscription

isTest() : this is this & { get endsAt(): null; endsTimestamp: null; get startsAt(): null; startsTimestamp: null; }

Indicates whether this entitlement is a test entitlement

isUserSubscription() : this is this & { get guild(): null; guildId: null }

Indicates whether this entitlement is a user subscription

toJSON(
...props: Record<string, boolean | string>[]
) : unknown

Inherited from: Base

valueOf() : string

Inherited from: Base