Entitlement
Implementation of the Discord Entitlement class in Luau
https://discord.com/developers/docs/monetization/entitlements#entitlement-object
Properties
type
The type of entitlement this object represents. Maps to Discord’s entitlement types.
id
The unique identifier for this entitlement.
skuId
The ID of the SKU (Stock Keeping Unit) that this entitlement grants access to.
applicationId
The ID of the application this entitlement is for.
userId
The ID of the user this entitlement belongs to. May be null for some entitlement types.
deleted
Whether this entitlement has been deleted.
startsAt
The date and time when this entitlement becomes active. May be null for permanent entitlements.
endsAt
The date and time when this entitlement expires. May be null for permanent entitlements.
guildId
The ID of the guild this entitlement is for. May be null for user-specific entitlements.
consumed
Whether this entitlement has been consumed. Only applicable to consumable entitlements.
Methods
The Entitlement instance has no set methods!
Functions
sync
Entitlement . sync () -> ()
self: Entitlement
entitlementData: apiTypes.EntitlementObject
Responsible for syncing data to this entitlement object. This is typically called by the API when this object is created or updated.
new
Entitlement . new () -> ()
entitlementData: apiTypes.EntitlementObject
Responsible for constructing this class.