Class

Invite

Invite to a guild channel or group DM. Discriminate with type / isGuild() / isGroupDM(). guildSnapshot / channelSnapshot are camelCase metadata, not cached structures. Use resolveGuild / resolveChannel for live structures.

Extends Base

Constructor

new Invite(client: Client, data: APIInvite)
client
Client

Properties

NameTypeDescription
channelSnapshotread-onlyInviteChannelSnapshot | null
clientread-onlyClient
coderead-onlystring
createdAtread-onlyDate | null
expiresAtread-onlyDate | null
guildSnapshotread-onlyInviteGuildSnapshot | null
inviterread-onlyUser | null
maxAgeread-onlynumber | null
maxUsesread-onlynumber | null
memberCountread-onlynumber | null
presenceCountread-onlynumber | null
temporaryread-onlyboolean | null
typeread-onlyInviteType
urlread-onlystringFull invite URL (uses this client's instance invite base).
usesread-onlynumber | null

Methods

.delete()

Promise<void>

Delete this invite. Requires Manage Guild or Create Instant Invite.

await invite.delete();

.resolveChannel()

Promise<Channel | null>

Resolve the cached/fetched Channel for this invite, or null. channelSnapshot is metadata only.

await invite.resolveChannel();

.resolveGuild()

Promise<Guild | null>

Resolve the cached/fetched Guild for this invite, or null. guildSnapshot is metadata only.

await invite.resolveGuild();