Skip to main content
Module

x/harmony/mod.ts>Invite

An easy to use Discord API Library for Deno.
Latest
class Invite
extends Base
Re-export
import { Invite } from "https://deno.land/x/harmony@v2.9.0/mod.ts";

Constructors

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

Properties

optional
approximateMemberCount: number
optional
approximatePresenceCount: number
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