Class Invite<CH>

Represents an invite.

Type Parameters

Hierarchy (view full)

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?: Date

When this invite was created.

expiresAt?: Date

The date at which this invite expires.

flags: number

This invite's flags.

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?: number

The time after which this invite expires.

maxUses?: number

The maximum number of times this invite can be used,

roles?: InviteRole[]

The roles assigned to the user upon accepting the invite .

stageInstance?: InviteStageInstance

Deprecated

The stage instance in the invite this channel is for.

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?: boolean

If this invite only grants temporary membership.

The type of this invite.

uses: undefined | number

The number of times this invite has been used.

Accessors

Methods

  • Get the target users for this invite. Requires being the inviter or having the MANAGE_GUILD or VIEW_AUDIT_LOG permission.

    Returns Promise<string[]>

  • Update the target users for this invite. Requires being the inviter or having the MANAGE_GUILD permission.

    Parameters

    • users: string[]

      The IDs of the users to allow accepting the invite.

    Returns Promise<null>