Method ListEntitlementsAsync
- Namespace
- DSharpPlus.Entities
- Assembly
- DSharpPlus.dll
ListEntitlementsAsync(ulong?, IEnumerable<ulong>?, ulong?, ulong?, int, ulong?, bool?, CancellationToken)
List all Entitlements belonging to this application.
public IAsyncEnumerable<DiscordEntitlement> ListEntitlementsAsync(ulong? userId = null, IEnumerable<ulong>? skuIds = null, ulong? before = null, ulong? after = null, int limit = 100, ulong? guildId = null, bool? excludeEnded = null, CancellationToken cancellationToken = default)
Parameters
userIdulong?Filters the entitlements by a user.
skuIdsIEnumerable<ulong>Filters the entitlements by specific SKUs.
beforeulong?Filters the entitlements to be before a specific snowflake. Can be used to filter by time. Mutually exclusive with parameter "after"
afterulong?Filters the entitlements to be after a specific snowflake. Can be used to filter by time. Mutually exclusive with parameter "before"
limitintLimits how many Entitlements should be returned. One API call per 100 entitlements
guildIdulong?Filters the entitlements by a specific Guild.
excludeEndedbool?Wheter or not to return time limited entitlements which have ended
cancellationTokenCancellationTokenCT to cancel the method before the next api call
Returns
- IAsyncEnumerable<DiscordEntitlement>
Returns the list of entitlements fitting to the filters
Exceptions
- ArgumentException
Thrown when both "before" and "after" is set