Table of Contents

Class RestEntitlement

Namespace
Discord.Rest
Assembly
Discord.Net.Rest.dll
public class RestEntitlement : RestEntity<ulong>, IEntitlement, ISnowflakeEntity, IEntity<ulong>
Inheritance
RestEntitlement
Implements
Inherited Members

Properties

ApplicationId

Gets the ID of the parent application.

public ulong ApplicationId { get; }

Property Value

ulong

CreatedAt

Gets when the snowflake was created.

public DateTimeOffset CreatedAt { get; }

Property Value

DateTimeOffset

A DateTimeOffset representing when the entity was first created.

EndsAt

Gets the end date at which the entitlement is no longer valid.

public DateTimeOffset? EndsAt { get; }

Property Value

DateTimeOffset?

Remarks

null when using test entitlements.

GuildId

Gets the ID of the guild that is granted access to the entitlement's SKU.

public ulong? GuildId { get; }

Property Value

ulong?

Remarks

null if the entitlement is for a user.

IsConsumed

Gets whether this entitlement has been consumed.

public bool IsConsumed { get; }

Property Value

bool

Remarks

Not applicable for App Subscriptions.

SkuId

Gets the ID of the SKU this entitlement is for.

public ulong SkuId { get; }

Property Value

ulong

StartsAt

Gets the start date at which the entitlement is valid.

public DateTimeOffset? StartsAt { get; }

Property Value

DateTimeOffset?

Remarks

null when using test entitlements.

Type

Gets the type of the entitlement.

public EntitlementType Type { get; }

Property Value

EntitlementType

UserId

Gets the ID of the user that is granted access to the entitlement's SKU.

public ulong? UserId { get; }

Property Value

ulong?

Remarks

null if the entitlement is for a guild.