Table of Contents

Class SocketInvite

Namespace
Kook.WebSocket
Assembly
Kook.Net.WebSocket.dll

Represents a WebSocket-based invite to a guild.

public class SocketInvite : SocketEntity<uint>, IInvite, IEntity<uint>, IDeletable
Inheritance
SocketInvite
Implements
Inherited Members

Properties

Channel

Gets the channel where this invite was created.

public SocketGuildChannel Channel { get; }

Property Value

SocketGuildChannel

ChannelId

Gets the ID of the channel this invite is linked to.

public ulong? ChannelId { get; }

Property Value

ulong?

A ulong representing the channel identifier that the invite points to.

Code

Gets the unique identifier for this invite.

public string Code { get; }

Property Value

string

A string containing the invite code (e.g. wEAF5t).

CreatedAt

Gets the time at which this invite was created.

public DateTimeOffset CreatedAt { get; }

Property Value

DateTimeOffset

A DateTimeOffset representing the time at which this invite was created.

ExpiresAt

Gets the time at which this invite will expire.

public DateTimeOffset? ExpiresAt { get; }

Property Value

DateTimeOffset?

A DateTimeOffset representing the time until this invite expires; null if this invite never expires.

Guild

Gets the guild where this invite was created.

public SocketGuild Guild { get; }

Property Value

SocketGuild

GuildId

Gets the ID of the guild this invite is linked to.

public ulong? GuildId { get; }

Property Value

ulong?

A ulong representing the guild identifier that the invite points to.

InvitedUsersCount

Gets the number of users that have accepted this invite.

public int InvitedUsersCount { get; }

Property Value

int

An int representing the number of users that have accepted this invite.

Inviter

Gets the user that created this invite if available.

public SocketGuildUser Inviter { get; }

Property Value

SocketGuildUser

MaxAge

Gets the time span until the invite expires.

public TimeSpan? MaxAge { get; }

Property Value

TimeSpan?

A TimeSpan representing the time span until this invite expires; null if this invite never expires.

MaxUses

Gets the max number of uses this invite may have.

public int? MaxUses { get; }

Property Value

int?

An int representing the number of uses this invite may be accepted until it is removed from the guild; null if none is set.

RemainingUses

Gets the number of times this invite still remains.

public int? RemainingUses { get; }

Property Value

int?

An int representing the number of times this invite still remains; null if none is set.

Url

Gets the URL used to accept this invite using Code.

public string Url { get; }

Property Value

string

A string containing the full invite URL (e.g. https://kaihei.co/wEAF5t).

Uses

Gets the number of times this invite has been used.

public int? Uses { get; }

Property Value

int?

An int representing the number of times this invite has been used; null if none is set.

Methods

DeleteAsync(RequestOptions?)

Deletes this object and all its children.

public Task DeleteAsync(RequestOptions? options = null)

Parameters

options RequestOptions

The options to be used when sending the request.

Returns

Task

ToString()

Gets the URL of the invite.

public override string ToString()

Returns

string

A string that resolves to the Url of the invite.