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
skuIdulongThe id of the sku the entitlement belongs to
ownerIdulongThe id of the entity which should recieve this entitlement
ownerTypeDiscordTestEntitlementOwnerTypeThe 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
skuDiscordStockKeepingUnitThe sku the entitlement belongs to
ownerIdulongThe id of the entity which should recieve this entitlement
ownerTypeDiscordTestEntitlementOwnerTypeThe 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
skuIdulongThe id of the sku the entitlement belongs to
userDiscordUserThe 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
skuIdulongThe id of the sku the entitlement belongs to
guildDiscordGuildThe 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
skuDiscordStockKeepingUnitThe sku the entitlement belongs to
userDiscordUserThe 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
skuDiscordStockKeepingUnitThe sku the entitlement belongs to
guildDiscordGuildThe 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.