Invite
classe · Source
Represents an invitation to a guild channel.
Extends: Base
Properties
guild
The guild the invite is for including welcome screen data if present Source
code
The code for this invite Source
presenceCount
The approximate number of online members of the guild this invite is for This is only available when the invite was fetched through Client#fetchInvite. Source
memberCount
The approximate total number of members of the guild this invite is for This is only available when the invite was fetched through Client#fetchInvite. Source
temporary
Whether or not this invite only grants temporary membership This is only available when the invite was fetched through GuildInviteManager#fetch or created through GuildInviteManager#create. Source
maxAge
The maximum age of the invite, in seconds, 0 if never expires This is only available when the invite was fetched through GuildInviteManager#fetch or created through GuildInviteManager#create. Source
uses
How many times this invite has been used This is only available when the invite was fetched through GuildInviteManager#fetch or created through GuildInviteManager#create. Source
maxUses
The maximum uses of this invite This is only available when the invite was fetched through GuildInviteManager#fetch or created through GuildInviteManager#create. Source
inviterId
The user's id who created this invite Source
inviter
The user who created this invite Source
targetUser
The user whose stream to display for this voice channel stream invite Source
targetApplication
The embedded application to open for this voice channel embedded application invite Source
targetType
The target type Source
type
The type of invite Source
channelId
The channel's id this invite is for Source
channel
The channel this invite is for Source
createdTimestamp
The timestamp this invite was created at Source
stageInstance
The stage instance data if there is a public StageInstance in the stage channel this invite is for Source
guildScheduledEvent
The guild scheduled event data if there is a GuildScheduledEvent in the channel this invite is for Source
flags
The flags that are applied to the invite. Source
roles
Partial roles assigned when this invite is accepted. Source
createdAt
The time the invite was created at Source
deletable
Whether the invite is deletable by the client user Source
expiresTimestamp
The timestamp the invite will expire at Source
expiresAt
The time the invite will expire at Source
url
The URL to the invite Source
client
The client that instantiated this Source
INVITES_PATTERN
Regular expression that globally matches Discord invite links Source
Methods
delete
Deletes this invite. Parameters
| Name | Type | Description |
|---|---|---|
reason? | string | Reason for deleting this invite |
Returns: Promise<Invite>Source
toString
When concatenated with a string, this automatically concatenates the invite's URL instead of the object. Returns: string
// Logs: Invite: https://discord.gg/A1b2C3
console.log(`Invite: ${invite}`);