class MonetizationAPI

export declare class MonetizationAPI

Constructors

constructor(
rest: REST
)

Constructs a new instance of the MonetizationAPI class

consumeEntitlement(
applicationId: Snowflake
entitlementId: Snowflake
options?: Pick<RequestData, 'signal'>
) : Promise<void>

Marks a given entitlement for the user as consumed. Only available for One-Time Purchase consumable SKUs.

See also: https://discord.com/developers/docs/resources/entitlement#consume-an-entitlement

createTestEntitlement(
applicationId: Snowflake
options?: Pick<RequestData, 'signal'>
) : Promise<Partial<Omit<APIEntitlement, "ends_at" | "starts_at">>>

Creates a test entitlement for an application's SKU.

See also: https://discord.com/developers/docs/resources/entitlement#create-test-entitlement

deleteTestEntitlement(
applicationId: Snowflake
entitlementId: Snowflake
options?: Pick<RequestData, 'signal'>
) : Promise<void>

Deletes a test entitlement for an application's SKU.

See also: https://discord.com/developers/docs/resources/entitlement#delete-test-entitlement

getEntitlement(
applicationId: Snowflake
entitlementId: Snowflake
options?: Pick<RequestData, 'signal'>
) : Promise<APIEntitlement>

Fetches an entitlement for an application.

See also: https://discord.com/developers/docs/resources/entitlement#get-entitlement

getEntitlements(
applicationId: Snowflake
options?: Pick<RequestData, 'signal'>
) : Promise<RESTGetAPIEntitlementsResult>

Fetches the entitlements for an application.

See also: https://discord.com/developers/docs/resources/entitlement#list-entitlements

getSKUs(
applicationId: Snowflake
options?: Pick<RequestData, 'signal'>
) : Promise<RESTGetAPISKUsResult>

Fetches the SKUs for an application.

See also: https://discord.com/developers/docs/resources/sku#list-skus

getSKUSubscription(
skuId: Snowflake
subscriptionId: Snowflake
options?: Pick<RequestData, 'signal'>
) : Promise<APISubscription>

Fetches a subscription for an SKU.

See also: https://discord.com/developers/docs/resources/subscription#get-sku-subscription