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
ulongThe id of the sku the entitlement belongs to
ownerId
ulongThe id of the entity which should recieve this entitlement
ownerType
DiscordTestEntitlementOwnerTypeThe 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
DiscordStockKeepingUnitThe sku the entitlement belongs to
ownerId
ulongThe id of the entity which should recieve this entitlement
ownerType
DiscordTestEntitlementOwnerTypeThe 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
ulongThe id of the sku the entitlement belongs to
user
DiscordUserThe 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
ulongThe id of the sku the entitlement belongs to
guild
DiscordGuildThe 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
DiscordStockKeepingUnitThe sku the entitlement belongs to
user
DiscordUserThe 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
DiscordStockKeepingUnitThe sku the entitlement belongs to
guild
DiscordGuildThe 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.