Package net.dv8tion.jda.api.entities
Interface Entitlement
- All Superinterfaces:
ISnowflake
Represents a user or guild that has access to a premium offering in your application.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumRepresents the type of this Entitlement -
Method Summary
Modifier and TypeMethodDescriptionconsume()Consumes theEntitlementif it has not already been consumed.default StringThe id of the parent application of thisEntitlementlongThe id of the parent application of thisEntitlementdefault StringThe guild id that is granted access to theEntitlements SKUlongThe guild id that is granted access to theEntitlements SKUdefault StringgetSkuId()The id of the SKU related to thisEntitlementlongThe id of the SKU related to thisEntitlementDate at which theEntitlementis no longer valid.The start date at which theEntitlementis valid.getType()The type of the Entitlementdefault StringThe id of the user that purchased theEntitlementlongThe id of the user that purchased theEntitlementbooleanWhether theEntitlementwas consumed or not.booleanWhether theEntitlementhas been deleted or not.Methods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getIdLong, getTimeCreated
-
Method Details
-
getSkuIdLong
long getSkuIdLong()The id of the SKU related to thisEntitlement- Returns:
- The id of the SKU related to this
Entitlement
-
getSkuId
The id of the SKU related to thisEntitlement- Returns:
- The id of the SKU related to this
Entitlement
-
getApplicationIdLong
long getApplicationIdLong()The id of the parent application of thisEntitlement- Returns:
- The id of the parent application of this
Entitlement
-
getApplicationId
The id of the parent application of thisEntitlement- Returns:
- The id of the parent application of this
Entitlement
-
getUserIdLong
long getUserIdLong()The id of the user that purchased theEntitlement- Returns:
- The id of the user that purchased the
Entitlement
-
getUserId
The id of the user that purchased theEntitlement- Returns:
- The id of the user that purchased the
Entitlement
-
getGuildIdLong
long getGuildIdLong()The guild id that is granted access to theEntitlements SKU- Returns:
- The id of the guild that purchased the
Entitlementor 0 if this is not a guild subscription
-
getGuildId
The guild id that is granted access to theEntitlements SKU- Returns:
- The id of the guild that purchased the
Entitlementornullif this is not a guild subscription
-
getType
The type of the Entitlement- Returns:
- the
Entitlementtype
-
isDeleted
boolean isDeleted()Whether theEntitlementhas been deleted or not.- Returns:
- True if the
Entitlementwas deleted, False otherwise - See Also:
-
getTimeStarting
The start date at which theEntitlementis valid.- Returns:
- Start date at which the
Entitlementis valid. Not present when using test entitlements.
-
getTimeEnding
Date at which theEntitlementis no longer valid.- Returns:
- Date at which the
Entitlementis no longer valid. Not present when using test entitlements.
-
isConsumed
boolean isConsumed()Whether theEntitlementwas consumed or not.- Returns:
- True if the
Entitlementwas consumed, False otherwise
-
consume
Consumes theEntitlementif it has not already been consumed.
Only One-Time Purchase consumableEntitlementscan be consumed.
After theEntitlementhas been consumed, it will be marked as consumed.- Returns:
- A
RestActionthat will consume theEntitlement
-