.delete()
→ Promise<void>
Delete this invite. Requires Manage Guild or Create Instant Invite.
await invite.delete();Class
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
new Invite(client: Client, data: APIInvite)| Name | Type | Description |
|---|---|---|
| channelSnapshotread-only | InviteChannelSnapshot | null | |
| clientread-only | Client | |
| coderead-only | string | |
| createdAtread-only | Date | null | |
| expiresAtread-only | Date | null | |
| guildSnapshotread-only | InviteGuildSnapshot | null | |
| inviterread-only | User | null | |
| maxAgeread-only | number | null | |
| maxUsesread-only | number | null | |
| memberCountread-only | number | null | |
| presenceCountread-only | number | null | |
| temporaryread-only | boolean | null | |
| typeread-only | InviteType | |
| urlread-only | string | Full invite URL (uses this client's instance invite base). |
| usesread-only | number | null |
→ Promise<void>
Delete this invite. Requires Manage Guild or Create Instant Invite.
await invite.delete();client: Client, codeOrUrl: string → Promise<Invite>
Fetch invite metadata by code or URL (does not join).
await Invite.fetch(client, codeOrUrl);→ boolean
invite.isGroupDM();→ boolean
invite.isGuild();→ Promise<Channel | null>
Resolve the cached/fetched Channel for this invite, or null. channelSnapshot is metadata only.
await invite.resolveChannel();→ Promise<Guild | null>
Resolve the cached/fetched Guild for this invite, or null. guildSnapshot is metadata only.
await invite.resolveGuild();