From d4ac129b05636629ff2c77e1b2f518137e2bdbf0 Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Sun, 5 Jun 2022 13:25:56 -0500 Subject: [PATCH] feat: narrow typings for args Text and SlashCommand x3 --- src/handler/structures/module.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/handler/structures/module.ts b/src/handler/structures/module.ts index 5075471..5afc91c 100644 --- a/src/handler/structures/module.ts +++ b/src/handler/structures/module.ts @@ -37,7 +37,7 @@ export type TextCommand = Override< onEvent: EventPlugin[]; //maybe allow BothPlugins for this also? plugins: CommandPlugin[]; //maybe allow BothPlugins for this also? alias?: string[]; - execute: (ctx: Context, args: Args) => Awaitable; + execute: (ctx: Context, args: ['text', string[]]) => Awaitable; } >; @@ -48,7 +48,7 @@ export type SlashCommand = Override< onEvent: EventPlugin[]; //maybe allow BothPlugins for this also? plugins: CommandPlugin[]; //maybe allow BothPlugins for this also? options?: SernOptionsData[]; - execute: (ctx: Context, args: Args) => Awaitable; + execute: (ctx: Context, args: ['slash', SlashOptions]) => Awaitable; } >;