Skip to main content

Class SocketInvite

Represents a WebSocket-based invite to a guild.

Assembly: Discord.Net.WebSocket.dll​
View Source​
Declaration
public class SocketInvite : SocketEntity<string>, IInviteMetadata, IInvite, IEntity<string>, IDeletable

Properties​

ChannelId​

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

View Source​
Declaration
public ulong ChannelId { get; }

Channel​

Gets the channel where this invite was created.

View Source​
Declaration
public SocketGuildChannel Channel { get; }

GuildId​

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

View Source​
Declaration
public ulong? GuildId { get; }

Guild​

Gets the guild where this invite was created.

View Source​
Declaration
public SocketGuild Guild { get; }

IInvite.ChannelType​

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

View Source​
Declaration
ChannelType IInvite.ChannelType { get; }

IInvite.ChannelName​

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

View Source​
Declaration
string IInvite.ChannelName { get; }

IInvite.GuildName​

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

View Source​
Declaration
string IInvite.GuildName { get; }

IInvite.PresenceCount​

Gets the approximated count of online members in the guild.

View Source​
Declaration
int? IInvite.PresenceCount { get; }

IInvite.MemberCount​

Gets the approximated count of total members in the guild.

View Source​
Declaration
int? IInvite.MemberCount { get; }

IsTemporary​

Gets a value that indicates whether the invite is a temporary one.

View Source​
Declaration
public bool IsTemporary { get; }

IInviteMetadata.MaxAge​

Gets the time (in seconds) until the invite expires.

View Source​
Declaration
int? IInviteMetadata.MaxAge { get; }

IInviteMetadata.MaxUses​

Gets the max number of uses this invite may have.

View Source​
Declaration
int? IInviteMetadata.MaxUses { get; }

IInviteMetadata.Uses​

Gets the number of times this invite has been used.

View Source​
Declaration
int? IInviteMetadata.Uses { get; }

MaxAge​

Gets the time (in seconds) until the invite expires.

View Source​
Declaration
public int MaxAge { get; }

MaxUses​

Gets the max number of uses this invite may have.

View Source​
Declaration
public int MaxUses { get; }

Uses​

Gets the number of times this invite has been used.

View Source​
Declaration
public int Uses { get; }

Inviter​

Gets the user that created this invite if available.

View Source​
Declaration
public SocketGuildUser Inviter { get; }

IInviteMetadata.CreatedAt​

Gets when this invite was created.

View Source​
Declaration
DateTimeOffset? IInviteMetadata.CreatedAt { get; }

CreatedAt​

Gets when this invite was created.

View Source​
Declaration
public DateTimeOffset CreatedAt { get; }

TargetUser​

Gets the user targeted by this invite if available.

View Source​
Declaration
public SocketUser TargetUser { get; }

TargetUserType​

Gets the type of the user targeted by this invite.

View Source​
Declaration
public TargetUserType TargetUserType { get; }

Code​

Gets the unique identifier for this invite.

View Source​
Declaration
public string Code { get; }

Url​

Gets the URL used to accept this invite using Discord.IInvite.Code.

View Source​
Declaration
public string Url { get; }

IInvite.Guild​

Gets the guild this invite is linked to.

View Source​
Declaration
IGuild IInvite.Guild { get; }

IInvite.Channel​

Gets the channel this invite is linked to.

View Source​
Declaration
IChannel IInvite.Channel { get; }

IInvite.Inviter​

Gets the user that created this invite.

View Source​
Declaration
IUser IInvite.Inviter { get; }

IInvite.TargetUser​

Gets the user this invite is linked to via Discord.IInvite.TargetUserType.

View Source​
Declaration
IUser IInvite.TargetUser { get; }

Methods​

DeleteAsync(RequestOptions)​

Deletes this object and all its children.

View Source​
Declaration
public Task DeleteAsync(RequestOptions options = null)
Returns​

System.Threading.Tasks.Task

Parameters​
TypeNameDescription
Discord.RequestOptionsoptionsThe options to be used when sending the request.

ToString()​

Gets the URL of the invite.

View Source​
Declaration
public override string ToString()
Returns​

System.String: A string that resolves to the Url of the invite.

Implements​