Class SocketInvite
Represents a WebSocket-based invite to a guild.
Assembly: Discord.Net.WebSocket.dll​
View Source​
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​
public ulong ChannelId { get; }
Channel​
Gets the channel where this invite was created.
View Source​
public SocketGuildChannel Channel { get; }
GuildId​
Gets the ID of the guild this invite is linked to.
View Source​
public ulong? GuildId { get; }
Guild​
Gets the guild where this invite was created.
View Source​
public SocketGuild Guild { get; }
IInvite.ChannelType​
Gets the type of the channel this invite is linked to.
View Source​
ChannelType IInvite.ChannelType { get; }
IInvite.ChannelName​
Gets the name of the channel this invite is linked to.
View Source​
string IInvite.ChannelName { get; }
IInvite.GuildName​
Gets the name of the guild this invite is linked to.
View Source​
string IInvite.GuildName { get; }
IInvite.PresenceCount​
Gets the approximated count of online members in the guild.
View Source​
int? IInvite.PresenceCount { get; }
IInvite.MemberCount​
Gets the approximated count of total members in the guild.
View Source​
int? IInvite.MemberCount { get; }
IsTemporary​
Gets a value that indicates whether the invite is a temporary one.
View Source​
public bool IsTemporary { get; }
IInviteMetadata.MaxAge​
Gets the time (in seconds) until the invite expires.
View Source​
int? IInviteMetadata.MaxAge { get; }
IInviteMetadata.MaxUses​
Gets the max number of uses this invite may have.
View Source​
int? IInviteMetadata.MaxUses { get; }
IInviteMetadata.Uses​
Gets the number of times this invite has been used.
View Source​
int? IInviteMetadata.Uses { get; }
MaxAge​
Gets the time (in seconds) until the invite expires.
View Source​
public int MaxAge { get; }
MaxUses​
Gets the max number of uses this invite may have.
View Source​
public int MaxUses { get; }
Uses​
Gets the number of times this invite has been used.
View Source​
public int Uses { get; }
Inviter​
Gets the user that created this invite if available.
View Source​
public SocketGuildUser Inviter { get; }
IInviteMetadata.CreatedAt​
Gets when this invite was created.
View Source​
DateTimeOffset? IInviteMetadata.CreatedAt { get; }
CreatedAt​
Gets when this invite was created.
View Source​
public DateTimeOffset CreatedAt { get; }
TargetUser​
Gets the user targeted by this invite if available.
View Source​
public SocketUser TargetUser { get; }
TargetUserType​
Gets the type of the user targeted by this invite.
View Source​
public TargetUserType TargetUserType { get; }
Code​
Gets the unique identifier for this invite.
View Source​
public string Code { get; }
Url​
Gets the URL used to accept this invite using Discord.IInvite.Code.
View Source​
public string Url { get; }
IInvite.Guild​
Gets the guild this invite is linked to.
View Source​
IGuild IInvite.Guild { get; }
IInvite.Channel​
Gets the channel this invite is linked to.
View Source​
IChannel IInvite.Channel { get; }
IInvite.Inviter​
Gets the user that created this invite.
View Source​
IUser IInvite.Inviter { get; }
IInvite.TargetUser​
Gets the user this invite is linked to via Discord.IInvite.TargetUserType.
View Source​
IUser IInvite.TargetUser { get; }
Methods​
DeleteAsync(RequestOptions)​
Deletes this object and all its children.
View Source​
public Task DeleteAsync(RequestOptions options = null)
Returns​
System.Threading.Tasks.Task
Parameters​
Type | Name | Description |
---|---|---|
Discord.RequestOptions | options | The options to be used when sending the request. |
ToString()​
Gets the URL of the invite.
View Source​
public override string ToString()
Returns​
System.String
:
A string that resolves to the Url of the invite.