Results

Namespace

Type

An object representing an invite on Discord for a channel in a discord.Guild. Extends discord.Invite

Hierarchy

  • Invite
    • GuildInvite <-- You are here!

Index

Type aliases

Static ChannelData

ChannelData: object

Partial channel data present on channel data.

Type declaration

  • Readonly id: Snowflake

    The id of the discord.Channel this data represents.

  • Readonly name: string

    The name of the channel.

  • Readonly type: Type

    The type of channel the invite resolves to.

Static GuildData

GuildData: object

Partial guild data present on some invite data.

Type declaration

  • Readonly features: Array<Feature>

    A list of features available for this guild. See discord.Guild.features for more info.

  • Readonly icon: string | null

    The icon of the guild, if set. See discord.Guild.icon for more info.

  • Readonly id: Snowflake

    The id of the discord.Guild.

  • Readonly name: string

    The name of the guild.

  • Readonly splash: string | null

    The splash image hash of the guild, if set.

  • Readonly vanityUrlCode: string | null

    The vanity url invite code for this guild, if set.

  • Readonly verificationLevel: MFALevel

    The level of user account verification required to send messages in this guild without a role.

Properties

Readonly approximateMemberCount

approximateMemberCount: null

Never set for a GuildInvite

Readonly approximatePresenceCount

approximatePresenceCount: null

Never set for a GuildInvite

Readonly channel

channel: ChannelData

Partial channel data for this invite.

Users who use this invite will be redirected to the channel id.

Readonly code

code: Snowflake

The unique identifier for this invite. May be used by user accounts to join a guild or group dm.

Readonly createdAt

createdAt: string

An ISO-8601 formatted timestamp string of when the invite was created.

Readonly guild

guild: GuildData

Partial data about the guild the invite originated from.

Readonly inviter

inviter: User | null

The user object who created this invite, if relevant.

Readonly maxAge

maxAge: number

The maximum duration (in seconds) after which the invite expires. 0 for never.

Readonly maxUses

maxUses: number

The configured maximum amount of times the invite is used before the invite expires. 0 for no limit.

Readonly targetUser

targetUser: User | null

A user that the invite targets.

Right now, this only indiicates if the invite is for a specific user's go-live stream in a guild's voice channel.

Readonly targetUserType

targetUserType: STREAM | null

If targetUser is set, this property specifies the type of invite and user this targets.

Right now, the only possible option is discord.Invite.TargetUserType.STREAM.

Readonly temporary

temporary: boolean

If true, the invite only grants temporary membership to the guild. Default is false.

Readonly uses

uses: number

The number of times this invite has been used.

Methods

delete

  • delete(): Promise<void>
  • Tries to delete this invite. The bot user must be able to manage the channel or guild the invite belongs.

    If an error occurs, a discord.ApiError will be thrown.

    Returns Promise<void>

getChannel

getGuild

  • getGuild(): Promise<Guild>
  • Attempts to retrieve the full Guild object for this invite.

    Returns Promise<Guild>

getUrl

  • getUrl(): string
  • Returns a url for the invite, in the format: https://discord.gg/<code>.

    Returns string

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc