@shadow-dev/core
Version:
A modular core framework for Discord bot development, providing commands, buttons, menus, middleware, and more.
9 lines (8 loc) • 454 B
TypeScript
import { ShadowEvent } from "./ShadowEvent";
import { EventPriority } from "./EventPriority";
export type ShadowEventListener<T extends ShadowEvent> = (event: T) => void | Promise<void>;
export declare class ShadowEventBus {
private listeners;
subscribe<T extends ShadowEvent>(eventName: string, listener: ShadowEventListener<T>, priority?: EventPriority): void;
dispatch<T extends ShadowEvent>(eventName: string, event: T): Promise<void>;
}