From 09e57c73ac55f3cc9f9444b8f30f8877f7410d4c Mon Sep 17 00:00:00 2001 From: jacoobes Date: Fri, 14 Apr 2023 12:45:41 -0500 Subject: [PATCH] moving and fixing imports --- src/core/plugins/args.ts | 2 +- src/core/structures/enums.ts | 19 +++++++++++++++++++ src/core/structures/index.ts | 2 +- src/core/structures/moduleStore.ts | 16 +--------------- src/handler/sern.ts | 9 ++++----- src/handler/structures/index.ts | 6 ------ 6 files changed, 26 insertions(+), 28 deletions(-) delete mode 100644 src/handler/structures/index.ts diff --git a/src/core/plugins/args.ts b/src/core/plugins/args.ts index 2438d45..9496041 100644 --- a/src/core/plugins/args.ts +++ b/src/core/plugins/args.ts @@ -20,7 +20,7 @@ import type { Module, } from '../../types/module'; import type { Args, Payload, Processed, SlashOptions } from '../../types/handler'; -import type Context from '../structures/context'; +import type { Context } from '../structures/context'; import type { MessageContextMenuCommandInteraction } from 'discord.js'; import type { ButtonInteraction, diff --git a/src/core/structures/enums.ts b/src/core/structures/enums.ts index f1cfa9b..122ed22 100644 --- a/src/core/structures/enums.ts +++ b/src/core/structures/enums.ts @@ -138,3 +138,22 @@ export enum PayloadType { */ Warning = 'warning', } + +export const enum ApplicationCommandType { + User, + Message, + ChatInput +} + + +export const enum ComponentType { + ActionRow = 1, + Button = 2, + StringSelect = 3, + TextInput = 4, + UserSelect = 5, + RoleSelect = 6, + MentionableSelect = 7, + ChannelSelect = 8, +} + diff --git a/src/core/structures/index.ts b/src/core/structures/index.ts index 917094c..007e816 100644 --- a/src/core/structures/index.ts +++ b/src/core/structures/index.ts @@ -1,4 +1,4 @@ -import Context from './context'; +import { Context } from './context'; import type Wrapper from './wrapper'; import { ModuleStore } from './moduleStore'; export * from './errors'; diff --git a/src/core/structures/moduleStore.ts b/src/core/structures/moduleStore.ts index 128cdcf..a9a1a83 100644 --- a/src/core/structures/moduleStore.ts +++ b/src/core/structures/moduleStore.ts @@ -1,22 +1,8 @@ import type { CommandModule } from '../../types/module'; import type { Processed } from '../../types/handler'; +import { ApplicationCommandType, ComponentType } from './enums'; -const enum ApplicationCommandType { - User, - Message, - ChatInput -} -const enum ComponentType { - ActionRow = 1, - Button = 2, - StringSelect = 3, - TextInput = 4, - UserSelect = 5, - RoleSelect = 6, - MentionableSelect = 7, - ChannelSelect = 8, -} /** * @since 2.0.0 diff --git a/src/handler/sern.ts b/src/handler/sern.ts index b4ac2d1..6fda81b 100644 --- a/src/handler/sern.ts +++ b/src/handler/sern.ts @@ -1,6 +1,5 @@ -import type Wrapper from './structures/wrapper'; +import type { Wrapper, CommandType, EventType, PluginType } from '../core/structures'; import { makeEventsHandler } from './events/userDefinedEventsHandling'; -import { CommandType, EventType, PluginType } from './structures/enums'; import type { AnyEventPlugin, ControlPlugin, InitPlugin, Plugin } from '../types/plugin'; import { makeInteractionCreate } from './events/interactionHandler'; import { makeReadyEvent } from './events/readyHandler'; @@ -14,9 +13,9 @@ import type { InputEvent, } from '../types/module'; import type { Dependencies, DependencyConfiguration } from '../types/handler'; -import { composeRoot, makeFetcher, useContainer } from './dependencies/provider'; -import type { Logging } from './contracts'; -import { err, ok, partition } from './utilities/functions'; +import { composeRoot, makeFetcher, useContainer } from '../core/dependencies/provider'; +import type { Logging } from '../core/contracts'; +import { err, ok, partition } from '../core/utilities/functions'; import type { Awaitable, ClientEvents } from 'discord.js'; /** diff --git a/src/handler/structures/index.ts b/src/handler/structures/index.ts deleted file mode 100644 index 917094c..0000000 --- a/src/handler/structures/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -import Context from './context'; -import type Wrapper from './wrapper'; -import { ModuleStore } from './moduleStore'; -export * from './errors'; -export * from './enums'; -export { Context, Wrapper, ModuleStore };