Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/harmony/src/structures/invite.ts>Invite

An easy to use Discord API Library for Deno.
Go to Latest
class Invite
extends Base
import { Invite } from "https://deno.land/x/harmony@v2.8.0/src/structures/invite.ts";

Constructors

new
Invite(client: Client, data: InvitePayload & Partial<InviteMetadataPayload>)

Properties

optional
approximateMemberCount: number
optional
approximatePresenceCount: number
channel: ChannelPayload
code: string
readonly
createdAt: Date | undefined

Timestamp (Date) when Invite was created. This is an Invite Metadata property (not always available)

optional
createdAtTimestamp: string

Timestamp (string) when Invite was created. This is an Invite Metadata property (not always available)

optional
guild: GuildPayload
optional
inviter: UserPayload
optional
maxAge: number

Max age of the Invite in seconds. This is an Invite Metadata property (not always available)

optional
maxUses: number

Max number of times this Invite can be used. This is an Invite Metadata property (not always available)

optional
targetUser: UserPayload
optional
targetUserType: number
optional
temporary: boolean

Whether Invite is temporary or not. This is an Invite Metadata property (not always available)

optional
uses: number

Number of times Invite was used. This is an Invite Metadata property (not always available)

Methods

delete(): Promise<Invite>

Delete an invite. Requires the MANAGE_CHANNELS permission on the channel this invite belongs to, or MANAGE_GUILD to remove any invite across the guild. Returns an invite object on success. Fires a Invite Delete Gateway event.

readFromData(data: InvitePayload & Partial<InviteMetadataPayload>): void
toString(): string