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).

ExpiresAt

Gets the time at which this invite will expire.

public DateTimeOffset? ExpiresAt { get; }

Property Value

DateTimeOffset?

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.

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?

MaxUses

Gets the max number of uses this invite may have.

public int? MaxUses { get; }

Property Value

int?

RemainingUses

Gets the number of times this invite still remains.

public int? RemainingUses { get; }

Property Value

int?

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?

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.