Method GetEntitlementsAsync
- Namespace
- DisCatSharp
- Assembly
- DisCatSharp.dll
GetEntitlementsAsync(ulong?, ulong?, List<ulong>?, ulong?, ulong?, int, bool?, bool?)
Gets the application's entitlements.
[RequiresFeature(Features.MonetizedApplication)]
public Task<IReadOnlyList<DiscordEntitlement>> GetEntitlementsAsync(ulong? guildId = null, ulong? userId = null, List<ulong>? skuIds = null, ulong? before = null, ulong? after = null, int limit = 100, bool? excludeEnded = null, bool? excludeDeleted = null)
Parameters
guildIdulong?Filter returned entitlements to a specific guild id.
userIdulong?Filter returned entitlements to a specific user id.
skuIdsList<ulong>Optional list of SKU IDs to check entitlements for.
beforeulong?Retrieve entitlements before this entitlement ID.
afterulong?Retrieve entitlements after this entitlement ID.
limitintNumber of entitlements to return, 1-100, default 100.
excludeEndedbool?Whether or not ended entitlements should be omitted. Defaults to false, ended entitlements are included by default.
excludeDeletedbool?Whether or not deleted entitlements should be omitted. Defaults to true, deleted entitlements are not included by default.
Returns
- Task<IReadOnlyList<DiscordEntitlement>>
A list of DiscordEntitlement.
Exceptions
- NotFoundException
Thrown when the entitlements do not exist.