revert: readd discordEvent

This commit is contained in:
Jacob Nguyen
2023-05-08 00:29:48 -05:00
parent 6bd7573b88
commit 9718360530
2 changed files with 35 additions and 3 deletions

View File

@@ -27,7 +27,6 @@ function uniqueId(t: CommandType) {
const am = (appBitField & t) !== 0 ? 'A' : 'C';
return am + apiType(t);
}
/**
* @since 1.0.0 The wrapper function to define command modules for sern
* @param mod
@@ -90,3 +89,35 @@ export function discordEvent<T extends keyof ClientEvents>(mod: {
...mod,
});
}
///**
// * @Experimental
// * Will be refactored / changed in future
// */
//export abstract class CommandExecutable<Type extends CommandType> {
// abstract type: Type;
// private static _fullPath = filePath();
// name = filename(CommandExecutable._fullPath);
// [sernMeta] = {
// id: ``,
// fullPath: CommandExecutable._fullPath
// }
// plugins: InitPlugin[] = [];
// onEvent: ControlPlugin[] = [];
// abstract execute() : Awaitable<unknown>
//
//}
///**
// * @Experimental
// * Will be refactored in future
// */
//export abstract class EventExecutable<Type extends EventType> {
// abstract type: Type;
// [sernMeta] = {
// id: '',
// fullPath: ''
// }
// plugins: InitPlugin[] = [];
// onEvent: ControlPlugin[] = [];
// abstract execute(): Awaitable<unknown>;
//}

View File

@@ -1,8 +1,9 @@
export * as Sern from './handler/sern';
export * from './types/core';
export * from './types/handler';
export * from './types/module';
export * from './types/plugin';
export * from './core';
export { controller } from './handler/sern';
export { commandModule, eventModule } from './commands';
export { Context } from './classic/context';
export { commandModule, eventModule, discordEvent } from './commands';