import type { MappedEvents } from "@discordjs/core"; import type { Optional } from "../types/types"; import type { EventPayload } from "../types/events"; export interface EventProps { name: string; type: T; once: boolean; run(...args: MappedEvents[T]): any; } export default class Event { public name: string; public type: T; public once: boolean; public run: (...args: MappedEvents[T]) => any; constructor(props: Optional, "once">) { this.name = props.name; this.type = props.type; this.once = !!props.once; this.run = props.run; } }