Skip to content
SinisterRectus edited this page Nov 16, 2019 · 15 revisions

extends Container

Represents an invitation to a Discord guild channel. Invites can be used to join a guild, though they are not always permanent.

Instances of this class should not be constructed by users.

Properties Inherited From Container

Name Type Description
client Client A shortcut to the client object to which this container is visible.
parent Container/Client The parent object of to which this container is a child. For example, the parent of a role is the guild in which the role exists.

Properties

Name Type Description
approximateMemberCount number/nil The approximate count of all members.
approximatePresenceCount number/nil The approximate count of online members.
channelId string The Snowflake ID of the channel to which this belongs.
channelName string The name of the channel to which this invite belongs.
channelType number The type of the channel to which this invite belongs. Use the channelType enumeration for a human-readable representation.
code string The invite's code which can be used to identify the invite.
createdAt string/nil The date and time at which the invite was created, represented as an ISO 8601 string plus microseconds when available. This will not exist if the invite is accessed via Client:getInvite.
guildBanner string/nil The hash for the guild's custom banner, if one is set.
guildBannerURL string/nil The URL that can be used to view the guild's banner, if one is set.
guildDescription string/nil The guild's custom description, if one is set.
guildIcon string/nil The hash for the guild's custom icon, if one is set.
guildIconURL string/nil The URL that can be used to view the guild's icon, if one is set.
guildId string The Snowflake ID of the guild to which this invite belongs.
guildName string The name of the guild to which this invite belongs.
guildSplash string/nil The hash for the guild's custom splash, if one is set.
guildSplashURL string/nil The URL that can be used to view the guild's splash, if one is set.
guildVerificationLevel number/nil The guild's verification level, if available.
inviter User/nil The object of the user that created the invite. This will not exist if the invite is a guild widget or a vanity invite.
maxAge number/nil How long, in seconds, this invite lasts before it expires. This will not exist if the invite is accessed via Client:getInvite.
maxUses number/nil The maximum amount of times this invite can be used. This will not exist if the invite is accessed via Client:getInvite.
revoked boolean/nil Whether the invite has been revoked. This will not exist if the invite is accessed via Client:getInvite.
temporary boolean/nil Whether the invite grants temporary membership. This will not exist if the invite is accessed via Client:getInvite.
uses number/nil How many times this invite has been used. This will not exist if the invite is accessed via Client:getInvite.

Methods Inherited From Container

__eq()

Defines the behavior of the == operator. Allows containers to be directly compared according to their type and __hash return values.

Returns: boolean


__tostring()

Defines the behavior of the tostring function. All containers follow the format ClassName: hash.

Returns: string


Methods

__hash()

Returns Invite.code

Returns: string


delete()

Permanently deletes the invite. This cannot be undone!

This method always makes an HTTP request.

Returns: boolean


Clone this wiki locally