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
userId
ulong?Filters the entitlements by a user.
skuIds
IEnumerable<ulong>Filters the entitlements by specific SKUs.
before
ulong?Filters the entitlements to be before a specific snowflake. Can be used to filter by time. Mutually exclusive with parameter "after"
after
ulong?Filters the entitlements to be after a specific snowflake. Can be used to filter by time. Mutually exclusive with parameter "before"
limit
intLimits how many Entitlements should be returned. One API call per 100 entitlements
guildId
ulong?Filters the entitlements by a specific Guild.
excludeEnded
bool?Wheter or not to return time limited entitlements which have ended
cancellationToken
CancellationTokenCT 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