Entitlement
List Entitlements
GetAPIEntitlements
Returns all entitlements for a given app, active and expired.
import { listEntitlements } from "dressed";
const entitlements = await listEntitlements(params?);Get Entitlement
GetAPIEntitlement
Returns an entitlement.
import { getEntitlement } from "dressed";
const entitlement = await getEntitlement(entitlementId);Consume Entitlement
PostAPIEntitlementConsume
For One-Time Purchase consumable SKUs, marks a given entitlement for the user as consumed.
import { consumeEntitlement } from "dressed";
await consumeEntitlement(entitlementId);The entitlement will have consumed: true when using List Entitlements.
Create Test Entitlement
PostAPIEntitlement
Creates a test entitlement to a given SKU for a given guild or user. Discord will act as though that user or guild has entitlement to your premium offering.
import { createTestEntitlement } from "dressed";
await createTestEntitlement(data);After creating a test entitlement, you'll need to reload your Discord client. After doing so, you'll see that your server or user now has premium access.
Delete Test Entitlement
DeleteAPIEntitlement
Creates a test entitlement to a given SKU for a given guild or user. Discord will act as though that user or guild has entitlement to your premium offering.
import { deleteTestEntitlement } from "dressed";
await deleteTestEntitlement(entitlementId);After creating a test entitlement, you'll need to reload your Discord client. After doing so, you'll see that your server or user now has premium access.