import type { Override } from '../../types/handler'; import type { BaseModule } from './module'; import type { CommandPlugin, EventPlugin, ExternalEmitterPlugin, SernEmitterPlugin, } from '../plugins/plugin'; import type { CommandType } from './enums'; import type { SernEventsMapping } from '../sernEmitter'; import type { Awaitable, ClientEvents } from 'discord.js'; export type SernEventCommand = Override< BaseModule, { name?: T; type: CommandType.Sern; onEvent: EventPlugin[]; plugins: SernEmitterPlugin[]; execute(...args: SernEventsMapping[T]): Awaitable; } >; export type DiscordEventCommand = Override< BaseModule, { name?: T; type: CommandType.Discord; onEvent: EventPlugin[]; plugins: CommandPlugin[]; execute(...args: ClientEvents[T]): Awaitable; } >; export type ExternalEventCommand = Override< BaseModule, { emitter: string; type: CommandType.External; onEvent: EventPlugin[]; plugins: ExternalEmitterPlugin[]; execute(...args: unknown[]): Awaitable; } >;