Monetization Related
See also
More about app monetization
SKU (Stock Keeping Unit)
- class discord.SKU
Bases:
object
SKUs (stock-keeping units) in Discord represent premium offerings that can be made available to your application’s users or guilds.
Added in version 2.0.
SKUFlags
- class discord.SKUFlags
Bases:
BaseFlags
Wraps up the flags of a
SKU
.- x == y
Checks if two SKUFlags are equal.
- x != y
Checks if two SKUFlags are not equal.
- hash(x)
Return the flag’s hash.
- iter(x)
Returns an iterator of
(name, value)
pairs. This allows it to be, for example, constructed as a dict or a list of pairs. Note that aliases are not shown.
- value
The raw value. This value is a bit array field of a 53-bit integer representing the currently available flags. You should query flags via the properties rather than using this raw value.
- Type:
- app_guild_subscription
A recurring SKU that can be purchased by a user and applied to a single server. Grants access to every user in that server.
- Type:
- app_user_subscription
Recurring SKU purchased by a user for themselves. Grants access to the purchasing user in every server.
- Type:
Entitlement
- class discord.Entitlement
Bases:
object
Entitlements represent a user’s claim to a premium offering for your application.
Added in version 2.0.
- user_id
app_user_subscription
only: The ID of the user that is granted access to the entitlement’s sku- Type:
Optional[
int
]
- guild_id
app_guild_subscription
only: The ID of the guild that is granted access to the entitlement’s sku- Type:
Optional[
int
]
- starts_at
Start date at which the entitlement is valid.
None
for test entitlements.- Type:
Optional[
datetime.datetime
]
- ends_at
Time at which the entitlement is no longer valid.
None
for test entitlements.- Type:
Optional[
datetime.datetime
]