Invite

export class Invite extends Base
export class Invite extends Base
Represents an invitation to a guild channel.

Extends

Base
The channel this invite is for
channelId:Snowflake | null
The id of the channel this invite is for
Readonly
client:Client<true>
The client that instantiated this
Inherited from Base
code:string
The code for this invite
Readonly
createdAt:Date | null
The time the invite was created at
createdTimestamp:number | null
The timestamp this invite was created at
Readonly
deletable:boolean
Whether the invite is deletable by the client user
Readonly
expiresAt:Date | null
The time the invite will expire at
Readonly
expiresTimestamp:number | null
The timestamp the invite will expire at
guild:InviteGuild | Guild | null
The guild the invite is for including welcome screen data if present
guildScheduledEvent:GuildScheduledEvent | null
The guild scheduled event data if there is a GuildScheduledEvent in the channel this invite is for
Readonly
inviter:User | null
The user who created this invite
inviterId:Snowflake | null
The user's id who created this invite
Static
InvitesPattern:RegExp
A regular expression that matches Discord invite links. The code group property is present on the exec() result of this expression.
maxAge:number | null
The maximum age of the invite, in seconds, 0 if never expires This is only available when the invite was fetched through or created through create.
maxUses:number | null
The maximum uses of this invite This is only available when the invite was fetched through or created through create.
memberCount:number
The approximate total number of members of the guild this invite is for This is only available when the invite was fetched through fetchInvite.
presenceCount:number
The approximate number of online members of the guild this invite is for This is only available when the invite was fetched through fetchInvite.
Deprecated
stageInstance:InviteStageInstance | null
true
Deprecated
The stage instance data if there is a public StageInstance in the stage channel this invite is for
targetApplication:IntegrationApplication | null
The embedded application to open for this voice channel embedded application invite
targetType:InviteTargetType | null
The target type
targetUser:User | null
The user whose stream to display for this voice channel stream invite
temporary:boolean | null
Whether or not this invite only grants temporary membership This is only available when the invite was fetched through or created through create.
Readonly
url:string
The URL to the invite
uses:number | null
How many times this invite has been used This is only available when the invite was fetched through or created through create.
delete(reason?):Promise<Invite>
Deletes this invite.
NameTypeOptionalDescription
reasonstringYesReason for deleting this invite
toJSON():unknown
toString():string
When concatenated with a string, this automatically concatenates the invite's URL instead of the object.
valueOf():string