Entitlements¶
discord_http.entitlements module¶
- class discord_http.entitlements.SKU(*, state, data)¶
Bases:
PartialSKURepresents a SKU (Stock Keeping Unit) object.
- Parameters:
state (DiscordAPI)
data (dict)
- application: PartialUser¶
The application that owns the SKU.
- async create_test_entitlement(*, owner_id, owner_type) PartialEntitlements¶
Create an entitlement for testing purposes.
- Parameters:
owner_id (
Snowflake|int) – The ID of the owner, can be GuildID or UserID.owner_type (
EntitlementOwnerType|int) – The type of the owner.
- Return type:
- Returns:
The created entitlement.
- class discord_http.entitlements.Entitlements(*, state, data)¶
Bases:
PartialEntitlementsRepresents an entitlement object.
- Parameters:
state (DiscordAPI)
data (dict)
- type: EntitlementType¶
The type of the entitlement.
- user: PartialUser | None¶
The user that owns the entitlement, if the owner type is user.
- application: PartialUser¶
The application that owns the entitlement.
- async fetch() Entitlements¶
Fetches the entitlement.
- Return type:
- sku: PartialSKU¶
The SKU that the entitlement belongs to.
- property guild: Guild | PartialGuild | None¶
Returns the guild the entitlement is in.
- class discord_http.entitlements.PartialEntitlements(*, state, id)¶
Bases:
PartialBaseRepresents a partial entitlement object.
- Parameters:
state (DiscordAPI)
id (int)
- async fetch() Entitlements¶
Fetches the entitlement.
- Return type:
- class discord_http.entitlements.PartialSKU(*, state, id)¶
Bases:
PartialBaseRepresents a partial SKU object.
- Parameters:
state (DiscordAPI)
id (int)
- async create_test_entitlement(*, owner_id, owner_type) PartialEntitlements¶
Create an entitlement for testing purposes.
- Parameters:
owner_id (
Snowflake|int) – The ID of the owner, can be GuildID or UserID.owner_type (
EntitlementOwnerType|int) – The type of the owner.
- Return type:
- Returns:
The created entitlement.