diff --git a/src/handler/events/messageEvent.ts b/src/handler/events/messageEvent.ts index b04d787..d1d0013 100644 --- a/src/handler/events/messageEvent.ts +++ b/src/handler/events/messageEvent.ts @@ -1,6 +1,5 @@ import type { Message } from 'discord.js'; import { concatMap, from, fromEvent, map, Observable, of } from 'rxjs'; -import type { Args } from '../..'; import { controller } from '../sern'; import Context from '../structures/context'; import type Wrapper from '../structures/wrapper'; diff --git a/src/handler/structures/module.ts b/src/handler/structures/module.ts index 3811660..3a31353 100644 --- a/src/handler/structures/module.ts +++ b/src/handler/structures/module.ts @@ -26,7 +26,7 @@ export interface BaseModule { type: CommandType | PluginType; name?: string; description: string; - execute: (ctx: Context, args: Args) => Awaitable; + execute: (...args: unknown[]) => Awaitable; } //possible refactoring types into interfaces and not types @@ -34,8 +34,8 @@ export type TextCommand = Override< BaseModule, { type: CommandType.Text; - onEvent: EventPlugin[]; - plugins: CommandPlugin[]; + onEvent: EventPlugin[]; //maybe allow BothPlugins for this also? + plugins: CommandPlugin[]; //maybe allow BothPlugins for this also? alias?: string[]; execute: (ctx: Context, args: ['text', string[]]) => Awaitable; } @@ -45,8 +45,8 @@ export type SlashCommand = Override< BaseModule, { type: CommandType.Slash; - onEvent: EventPlugin[]; - plugins: CommandPlugin[]; + onEvent: EventPlugin[]; //maybe allow BothPlugins for this also? + plugins: CommandPlugin[]; //maybe allow BothPlugins for this also? options?: SernOptionsData[]; execute: (ctx: Context, args: ['slash', SlashOptions]) => Awaitable; } @@ -57,9 +57,10 @@ export type BothCommand = Override< { type: CommandType.Both; onEvent: EventPlugin[]; - plugins: CommandPlugin[]; + plugins: CommandPlugin[]; alias?: string[]; options?: SernOptionsData[]; + execute: (ctx: Context, args: Args) => Awaitable; } >; @@ -68,7 +69,7 @@ export type ContextMenuUser = Override< { type: CommandType.MenuUser; onEvent: EventPlugin[]; - plugins: CommandPlugin[]; + plugins: CommandPlugin[]; execute: (ctx: UserContextMenuCommandInteraction) => Awaitable; } >; @@ -78,7 +79,7 @@ export type ContextMenuMsg = Override< { type: CommandType.MenuMsg; onEvent: EventPlugin[]; - plugins: CommandPlugin[]; + plugins: CommandPlugin[]; execute: (ctx: MessageContextMenuCommandInteraction) => Awaitable; } >; @@ -88,7 +89,7 @@ export type ButtonCommand = Override< { type: CommandType.Button; onEvent: EventPlugin[]; - plugins: CommandPlugin[]; + plugins: CommandPlugin[]; execute: (ctx: ButtonInteraction) => Awaitable; } >; @@ -98,7 +99,7 @@ export type SelectMenuCommand = Override< { type: CommandType.MenuSelect; onEvent: EventPlugin[]; - plugins: CommandPlugin[]; + plugins: CommandPlugin[]; execute: (ctx: SelectMenuInteraction) => Awaitable; } >; @@ -108,7 +109,7 @@ export type ModalSubmitCommand = Override< { type: CommandType.Modal; onEvent: EventPlugin[]; - plugins: CommandPlugin[]; + plugins: CommandPlugin[]; execute: (ctx: ModalSubmitInteraction) => Awaitable; } >;