Class Invite<T, CH>

Represents an invite.

Type Parameters

Hierarchy

  • Invite

Constructors

Properties

approximateMemberCount?: number

The approximate number of total members in the guild this invite leads to.

approximatePresenceCount?: number

The approximate number of online members in the guild this invite leads to.

channelID: null | string

The ID of the channel this invite leads to.

code: string

The code of this invite.

createdAt: T extends "withMetadata" ? Date : undefined

When this invite was created.

expiresAt?: T extends "withMetadata" | "withoutExpiration" ? never : Date

The date at which this invite expires.

guild: null | InviteGuild

The guild this invite leads to or null if this invite leads to a Group DM.

guildID: null | string

The ID of the guild this invite leads to or null if this invite leads to a Group DM.

guildScheduledEvent?: GuildScheduledEvent

The scheduled event associated with this invite.

inviter?: User

The user that created this invite.

maxAge: T extends "withMetadata" ? number : never

The time after which this invite expires.

maxUses: T extends "withMetadata" ? number : never

The maximum number of times this invite can be used,

stageInstance?: InviteStageInstance

Deprecated

The stage instance in the invite this channel is for (deprecated).

targetApplication?: PartialApplication

The embedded application this invite will open.

targetType?: InviteTargetTypes

The target type of this invite.

targetUser?: User

The user whose stream to display for this voice channel stream invite.

temporary: T extends "withMetadata" ? boolean : never

If this invite only grants temporary membership.

uses: T extends "withMetadata" ? number : never

The number of times this invite has been used.

Accessors

Methods

  • Delete this invite.

    Parameters

    • Optional reason: string

      The reason for deleting this invite.

    Returns Promise<Invite<"withMetadata", CH>>

  • Whether this invite belongs to a cached channel. The only difference on using this method over a simple if statement is to easily update all the invite properties typing definitions based on the channel it belongs to.

    Returns this is Invite<T, InviteChannel>