UNPKG

@amelix/phoenix.js

Version:

A feature-rich API wrapper for the critically acclaimed chatting app Phoenix.. or something.

37 lines (36 loc) 1.28 kB
import Base from "./Base"; import { Client } from "./Client"; import DeletedUser from "./DeletedUser"; import Server from "./Server"; import { AnyServerChannel } from "./ServerChannel"; import User from "./User"; /** Represents an invite by which servers can be joined. */ export default class Invite extends Base { /** The current amount of times this invite has been used. */ uses: number; /** The maximum times this invite can be used. 0 means there is no limit. */ maxUses: number; /** The UNIX timestamp for when this invite expires. */ expires: number; /** An array of users that are allowed to use this invite. */ invitedUsers: string[]; /** The user who created the invite. */ createdBy: User | DeletedUser; /** The server this invite was created in. */ server: Server; /** The channel this invite leads to. */ channel: AnyServerChannel; constructor(client: Client, data: any); /** Edit this invite. */ edit(data: InviteData): Promise<void>; /** Permanently delete this invite. */ delete(): Promise<void>; } interface InviteData { id?: string; maxUses?: number; expires?: number; expiresAfter?: number; invitedUsers?: string[]; } export {};