Entitlements

discord_http.entitlements module

class discord_http.entitlements.Entitlements(*, state: DiscordAPI, data: dict)[source]

Bases: PartialEntitlements

is_consumed() bool[source]

bool: Returns whether the entitlement is consumed or not.

class discord_http.entitlements.PartialEntitlements(*, state: DiscordAPI, id: int)[source]

Bases: PartialBase

async consume() None[source]

Mark the entitlement as consumed.

async delete_test_entitlement() None[source]

Deletes a test entitlement.

async fetch() Entitlements[source]

Entitlements: Fetches the entitlement.

class discord_http.entitlements.PartialSKU(*, state: DiscordAPI, id: int)[source]

Bases: PartialBase

async create_test_entitlement(*, owner_id: Snowflake | int, owner_type: EntitlementOwnerType | int) PartialEntitlements[source]

Create an entitlement for testing purposes.

Parameters:
  • owner_id (Union[Snowflake, int]) – The ID of the owner, can be GuildID or UserID.

  • owner_type (Union[EntitlementOwnerType, int]) – The type of the owner.

Returns:

The created entitlement.

Return type:

PartialEntitlements

class discord_http.entitlements.SKU(*, state: DiscordAPI, data: dict)[source]

Bases: PartialSKU