diff --git a/src/handler/events/messageEvent.ts b/src/handler/events/messageEvent.ts index 9b5d7cc..b04d787 100644 --- a/src/handler/events/messageEvent.ts +++ b/src/handler/events/messageEvent.ts @@ -22,7 +22,7 @@ export const onMessageCreate = (wrapper: Wrapper) => { const [prefix, ...rest] = fmt(message, defaultPrefix); return { ctx: Context.wrap(message), - args: ['text', rest], + args: <['text', string[]]>['text', rest], mod: Files.TextCommands.text.get(prefix) ?? Files.BothCommands.get(prefix) ?? diff --git a/src/handler/structures/module.ts b/src/handler/structures/module.ts index d600650..3811660 100644 --- a/src/handler/structures/module.ts +++ b/src/handler/structures/module.ts @@ -15,7 +15,7 @@ import type { SelectMenuInteraction, UserContextMenuCommandInteraction, } from 'discord.js'; -import type { Args, Override } from '../../types/handler'; +import type { Args, Override, SlashOptions } from '../../types/handler'; import type { CommandPlugin, EventPlugin } from '../plugins/plugin'; import type Context from './context'; import { CommandType, PluginType } from './enums'; @@ -37,6 +37,7 @@ export type TextCommand = Override< onEvent: EventPlugin[]; plugins: CommandPlugin[]; alias?: string[]; + execute: (ctx: Context, args: ['text', string[]]) => Awaitable; } >; @@ -47,6 +48,7 @@ export type SlashCommand = Override< onEvent: EventPlugin[]; plugins: CommandPlugin[]; options?: SernOptionsData[]; + execute: (ctx: Context, args: ['slash', SlashOptions]) => Awaitable; } >;