node-event-bot/server/structures/event.ts

9 lines
190 B
TypeScript

import { ClientEvents } from "discord.js";
export class Event<Key extends keyof ClientEvents>{
constructor(
public event: Key,
public run: (...args: ClientEvents[Key]) => any
) { }
}