mirror of
https://github.com/sern-handler/handler
synced 2026-06-22 07:42:14 +00:00
refactor: Change sernModule fn signature
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
};
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user