From 86457a78ffa1cc83ea1db0d57696adbaa32b3c45 Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Sat, 14 May 2022 23:12:26 -0500 Subject: [PATCH] refactor: Change sernModule fn signature --- src/handler/events/interactionCreate.ts | 6 ++---- src/handler/plugins/plugin.ts | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/handler/events/interactionCreate.ts b/src/handler/events/interactionCreate.ts index 7494e9b..977bd23 100644 --- a/src/handler/events/interactionCreate.ts +++ b/src/handler/events/interactionCreate.ts @@ -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); }; diff --git a/src/handler/plugins/plugin.ts b/src/handler/plugins/plugin.ts index 768ce53..d5e2749 100644 --- a/src/handler/plugins/plugin.ts +++ b/src/handler/plugins/plugin.ts @@ -61,9 +61,9 @@ export function plugins | 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, }; }