refactor: Change sernModule fn signature

This commit is contained in:
Jacob Nguyen
2022-05-14 23:12:26 -05:00
parent 58b7a6c21b
commit 86457a78ff
2 changed files with 4 additions and 6 deletions

View File

@@ -5,7 +5,7 @@ import type {
MessageContextMenuCommandInteraction as MessageCtxInt,
UserContextMenuCommandInteraction as UserCtxInt,
} from 'discord.js';
import { concatMap, fromEvent, Observable, of, throwError, map } from 'rxjs';
import { concatMap, fromEvent, Observable, of, throwError } from 'rxjs';
import type Wrapper from '../structures/wrapper';
import * as Files from '../utilities/readFile';
import { isEventPlugin } from './readyEvent';
@@ -100,9 +100,7 @@ export const onInteractionCreate = (wrapper: Wrapper) => {
else return throwError(() => SernError.NotSupportedInteraction);
}),
)
.subscribe(modul => {
});
.subscribe(console.log);
};

View File

@@ -61,9 +61,9 @@ export function plugins<T extends CommandType, V extends EventPlugin<T> | Comman
return plug;
}
export function sernModule(plugins: { command: CommandPlugin[]; onEvent: EventPlugin[] }, mod: Module): PluggedModule {
export function sernModule(plugins: SernPlugin[] , mod: Module): PluggedModule {
return {
mod,
plugins: [...plugins.command, ...plugins.onEvent],
plugins,
};
}