From 5556b2aa0afcb492717fe4f5e09cbf7d9a977058 Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Tue, 17 May 2022 16:14:47 -0500 Subject: [PATCH] refactor: make ApplicationCommandOptions optional --- src/handler/structures/module.ts | 6 ++---- src/types/handler.ts | 10 ++-------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/handler/structures/module.ts b/src/handler/structures/module.ts index 9684142..9f33d6c 100644 --- a/src/handler/structures/module.ts +++ b/src/handler/structures/module.ts @@ -11,7 +11,6 @@ import type { Args } from '../../types/handler'; import type { CommandType } from '../sern'; import type { CommandPlugin, EventPlugin } from '../plugins/plugin'; import type Context from './context'; -import { Base } from 'discord.js'; import type { PluginType } from '../plugins/plugin'; export interface BaseModule { @@ -33,8 +32,7 @@ export type SlashCommand = Override[] plugins?: (CommandPlugin)[]; - options: ApplicationCommandOptionData[] | []; - + options?: ApplicationCommandOptionData[]; }>; export type BothCommand = Override[] plugins?: (CommandPlugin)[] alias?: string[]; - options: ApplicationCommandOptionData[] | []; + options?: ApplicationCommandOptionData[]; }>; export type ContextMenuUser = Override = Omit & T2; -export type UnionToTuple = T extends readonly [infer V, infer S] - ? V extends V - ? S extends S - ? [V, S] - : [V] - : never - : never; +export type DefinitelyDefined = T & Override; + -export type DefinitelyDefined = T & Override \ No newline at end of file