import type { ClientEvents } from "discord.js"; import type { EventContext } from "../core/context"; export interface EventOptions { id: string; name: keyof ClientEvents; once?: boolean; execute: (ctx: EventContext, ...args: unknown[]) => Promise; } export class Event { readonly type = "event" as const; readonly id: string; readonly name: keyof ClientEvents; readonly once?: boolean; readonly execute: (ctx: EventContext, ...args: unknown[]) => Promise; constructor(options: EventOptions) { this.id = options.id; this.name = options.name; this.once = options.once; this.execute = options.execute; } }