Entitlements

discord_http.entitlements module

class discord_http.entitlements.Entitlements(*, state, data)

Bases: PartialEntitlements

Parameters:
property guild: Guild | PartialGuild | None

Returns the guild the entitlement is in.

is_consumed() bool

Returns whether the entitlement is consumed or not.

Return type:

bool

class discord_http.entitlements.PartialEntitlements(*, state, id)

Bases: PartialBase

Parameters:
async consume() None

Mark the entitlement as consumed.

Return type:

None

async delete_test_entitlement() None

Deletes a test entitlement.

Return type:

None

async fetch() Entitlements

Fetches the entitlement.

Return type:

Entitlements

class discord_http.entitlements.PartialSKU(*, state, id)

Bases: PartialBase

Parameters:
async create_test_entitlement(*, owner_id, owner_type) PartialEntitlements

Create an entitlement for testing purposes.

Parameters:
Return type:

PartialEntitlements

Returns:

The created entitlement.

class discord_http.entitlements.SKU(*, state, data)

Bases: PartialSKU

Represents a SKU (Stock Keeping Unit) object.

Parameters:
name

The name of the SKU.

Type:

str

slug

The slug of the SKU.

Type:

str

type

The type of the SKU.

Type:

SKUType

flags

The flags of the SKU.

Type:

SKUFlags

application

The application that owns the SKU.

Type:

PartialUser