more cringe (#2919)

This commit is contained in:
Mihail Gribkov
2024-04-28 17:42:38 +03:00
committed by GitHub
parent f85bf9ac48
commit f9086d3a2c
12 changed files with 87 additions and 4 deletions

View File

@@ -447,6 +447,10 @@ namespace Discord.WebSocket
public Task<IReadOnlyCollection<SKU>> GetSKUsAsync(RequestOptions options = null)
=> ClientHelper.ListSKUsAsync(this, options);
/// <inheritdoc />
public Task ConsumeEntitlementAsync(ulong entitlementId, RequestOptions options = null)
=> ClientHelper.ConsumeEntitlementAsync(this, entitlementId, options);
/// <summary>
/// Gets entitlements from cache.
/// </summary>

View File

@@ -67,7 +67,7 @@ public class SocketEntitlement : SocketEntity<ulong>, IEntitlement
ApplicationId = model.ApplicationId;
Type = model.Type;
IsConsumed = model.IsConsumed;
IsConsumed = model.IsConsumed.GetValueOrDefault(false);
StartsAt = model.StartsAt.IsSpecified
? model.StartsAt.Value
: null;