Invite

Invite

Represents an invite. Some properties are only available when fetching invites from channels, which requires the Manage Channel permission.

Constructor

new Invite()

Properties:
Properties
Name Type Attributes Description
channel TextChannel | NewsChannel | VoiceChannel | GroupChannel | StageChannel | Object <nullable>

Info on the invite channel

Name Type Attributes Description
icon String <nullable>

The icon of a channel (group dm)

id String

The ID of the invite's channel

name String <nullable>

The name of the invite's channel

type Number

The type of the invite's channel

code String

The invite code

createdAt Number <nullable>

Timestamp of invite creation

expiresAt Number <nullable>

Timestamp of invite expiration

guild Guild | Object <nullable>

Info on the invite guild. If the guild is not cached, this will be an object with an id key. No other property is guaranteed.

inviter User <nullable>

The invite creator

maxAge Number <nullable>

How long the invite lasts in seconds

maxUses Number <nullable>

The max number of invite uses

memberCount Number <nullable>

The approximate member count for the guild

presenceCount Number <nullable>

The approximate presence count for the guild

stageInstance Object <nullable>

[DEPRECATED] The active public stage instance data for the stage channel this invite is for

targetApplicationID String <nullable>

The target application id

targetType Number <nullable>

The type of the target application

targetUser User <nullable>

The user whose stream is displayed for the invite (voice channel only)

temporary Boolean <nullable>

Whether the invite grants temporary membership or not

uses Number <nullable>

The number of invite uses

Source:

Methods

delete(reasonopt) → {Promise}

Delete the invite

Source:
Parameters:
Name Type Attributes Description
reason String <optional>

The reason to be displayed in audit logs

Returns:
Type:
Promise