diff --git a/src/core/plugins/args.ts b/src/core/plugins/args.ts deleted file mode 100644 index da5dece..0000000 --- a/src/core/plugins/args.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { CommandType, PluginType, EventType } from '../structures/enums'; -import type { Module } from '../../types/module'; -import type { Processed } from '../../types/core'; -import { CommandArgsMatrix, EventArgsMatrix } from '../../types/module'; - -export interface InitArgs> { - module: T; - absPath: string; -} - -export type CommandArgs< - I extends CommandType = CommandType, - J extends PluginType = PluginType, -> = CommandArgsMatrix[I][J]; - -export type EventArgs< - I extends EventType = EventType, - J extends PluginType = PluginType, -> = EventArgsMatrix[I][J]; diff --git a/src/core/plugins/create-plugin.ts b/src/core/plugins/create-plugin.ts deleted file mode 100644 index 2b98534..0000000 --- a/src/core/plugins/create-plugin.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { CommandType, EventType, PluginType } from '../structures'; -import type { Plugin, PluginResult } from '../../types/plugin'; -import type { CommandArgs, EventArgs } from './args'; -import type { ClientEvents } from 'discord.js'; - -export function makePlugin( - type: PluginType, - execute: (...args: any[]) => any, -): Plugin { - return { - type, - execute, - } as Plugin; -} -/** - * @since 2.5.0 - * @__PURE__ - */ -export function EventInitPlugin( - execute: (...args: EventArgs) => PluginResult, -) { - return makePlugin(PluginType.Init, execute); -} -/** - * @since 2.5.0 - * @__PURE__ - */ -export function CommandInitPlugin( - execute: (...args: CommandArgs) => PluginResult, -) { - return makePlugin(PluginType.Init, execute); -} -/** - * @since 2.5.0 - * @__PURE__ - */ -export function CommandControlPlugin( - execute: (...args: CommandArgs) => PluginResult, -) { - return makePlugin(PluginType.Control, execute); -} -/** - * @since 2.5.0 - * @__PURE__ - */ -export function EventControlPlugin( - execute: (...args: EventArgs) => PluginResult, -) { - return makePlugin(PluginType.Control, execute); -} - -/** - * @since 2.5.0 - * @Experimental - * A specialized function for creating control plugins with discord.js ClientEvents. - * Will probably be moved one day! - */ -export function DiscordEventControlPlugin( - name: T, - execute: (...args: ClientEvents[T]) => PluginResult, -) { - return makePlugin(PluginType.Control, execute); -} diff --git a/src/core/plugins/index.ts b/src/core/plugins/index.ts deleted file mode 100644 index 593a16e..0000000 --- a/src/core/plugins/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './args'; -export * from './create-plugin';