Table of Contents

Method CreateTestEntitlementAsync

Namespace
DSharpPlus.Entities
Assembly
DSharpPlus.dll

CreateTestEntitlementAsync(ulong, ulong, DiscordTestEntitlementOwnerType)

Creates a test entitlement for a user or guild

public ValueTask<DiscordEntitlement> CreateTestEntitlementAsync(ulong skuId, ulong ownerId, DiscordTestEntitlementOwnerType ownerType)

Parameters

skuId ulong

The id of the sku the entitlement belongs to

ownerId ulong

The id of the entity which should recieve this entitlement

ownerType DiscordTestEntitlementOwnerType

The type of the entity which should recieve this entitlement

Returns

ValueTask<DiscordEntitlement>

The created entitlement

Remarks

This endpoint returns a partial entitlement object. It will not contain subscription_id, starts_at, or ends_at, as it's valid in perpetuity. 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.

CreateTestEntitlementAsync(DiscordStockKeepingUnit, ulong, DiscordTestEntitlementOwnerType)

Creates a test entitlement for a user or guild

public ValueTask<DiscordEntitlement> CreateTestEntitlementAsync(DiscordStockKeepingUnit sku, ulong ownerId, DiscordTestEntitlementOwnerType ownerType)

Parameters

sku DiscordStockKeepingUnit

The sku the entitlement belongs to

ownerId ulong

The id of the entity which should recieve this entitlement

ownerType DiscordTestEntitlementOwnerType

The type of the entity which should recieve this entitlement

Returns

ValueTask<DiscordEntitlement>

The created entitlement

Remarks

This endpoint returns a partial entitlement object. It will not contain subscription_id, starts_at, or ends_at, as it's valid in perpetuity. 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.

CreateTestEntitlementAsync(ulong, DiscordUser)

Creates a test entitlement for a user or guild

public ValueTask<DiscordEntitlement> CreateTestEntitlementAsync(ulong skuId, DiscordUser user)

Parameters

skuId ulong

The id of the sku the entitlement belongs to

user DiscordUser

The user which should recieve this entitlement

Returns

ValueTask<DiscordEntitlement>

The created entitlement

Remarks

This endpoint returns a partial entitlement object. It will not contain subscription_id, starts_at, or ends_at, as it's valid in perpetuity. 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.

CreateTestEntitlementAsync(ulong, DiscordGuild)

Creates a test entitlement for a user or guild

public ValueTask<DiscordEntitlement> CreateTestEntitlementAsync(ulong skuId, DiscordGuild guild)

Parameters

skuId ulong

The id of the sku the entitlement belongs to

guild DiscordGuild

The guild which should recieve this entitlement

Returns

ValueTask<DiscordEntitlement>

The created entitlement

Remarks

This endpoint returns a partial entitlement object. It will not contain subscription_id, starts_at, or ends_at, as it's valid in perpetuity. 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.

CreateTestEntitlementAsync(DiscordStockKeepingUnit, DiscordUser)

Creates a test entitlement for a user or guild

public ValueTask<DiscordEntitlement> CreateTestEntitlementAsync(DiscordStockKeepingUnit sku, DiscordUser user)

Parameters

sku DiscordStockKeepingUnit

The sku the entitlement belongs to

user DiscordUser

The user which should recieve this entitlement

Returns

ValueTask<DiscordEntitlement>

The created entitlement

Remarks

This endpoint returns a partial entitlement object. It will not contain subscription_id, starts_at, or ends_at, as it's valid in perpetuity. 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.

CreateTestEntitlementAsync(DiscordStockKeepingUnit, DiscordGuild)

Creates a test entitlement for a user or guild

public ValueTask<DiscordEntitlement> CreateTestEntitlementAsync(DiscordStockKeepingUnit sku, DiscordGuild guild)

Parameters

sku DiscordStockKeepingUnit

The sku the entitlement belongs to

guild DiscordGuild

The guild which should recieve this entitlement

Returns

ValueTask<DiscordEntitlement>

The created entitlement

Remarks

This endpoint returns a partial entitlement object. It will not contain subscription_id, starts_at, or ends_at, as it's valid in perpetuity. 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.