diff --git a/src/core/index.ts b/src/core/index.ts index 1827b49..e036b5d 100644 --- a/src/core/index.ts +++ b/src/core/index.ts @@ -1,3 +1,3 @@ import SernEmitter from './sernEmitter' - +export * from './operators' export { SernEmitter }; diff --git a/src/handler/events/operators/index.ts b/src/core/operators.ts similarity index 88% rename from src/handler/events/operators/index.ts rename to src/core/operators.ts index 9c03195..039e47b 100644 --- a/src/handler/events/operators/index.ts +++ b/src/core/operators.ts @@ -5,13 +5,13 @@ */ import { concatMap, defaultIfEmpty, EMPTY, every, map, of, OperatorFunction, pipe } from 'rxjs'; -import type { AnyModule } from '../../../types/module'; -import { nameOrFilename } from '../../utilities/functions'; -import type { PluginResult, VoidResult } from '../../../types/plugin'; -import { guayin } from '../../plugins'; +import type { AnyModule } from '../types/module'; +import { nameOrFilename } from './utilities/functions'; +import type { PluginResult, VoidResult } from '../types/plugin'; +import { guayin } from './plugins'; import { controller } from '../../sern'; import { Result } from 'ts-results-es'; -import { ImportPayload, Processed } from '../../../types/handler'; +import { ImportPayload } from '../types/handler'; /** * if {src} is true, mapTo V, else ignore * @param item diff --git a/src/core/structures/moduleStore.ts b/src/core/structures/moduleStore.ts index a9a1a83..2ee861c 100644 --- a/src/core/structures/moduleStore.ts +++ b/src/core/structures/moduleStore.ts @@ -3,7 +3,6 @@ import type { Processed } from '../../types/handler'; import { ApplicationCommandType, ComponentType } from './enums'; - /** * @since 2.0.0 * Storing all command modules diff --git a/src/core/structures/wrapper.ts b/src/core/structures/wrapper.ts index 657174e..f6b54a0 100644 --- a/src/core/structures/wrapper.ts +++ b/src/core/structures/wrapper.ts @@ -9,6 +9,7 @@ interface Wrapper { readonly defaultPrefix?: string; readonly commands: string; readonly events?: string; + readonly strategy: PlatformStrategy; readonly containerConfig: { get: (...keys: (keyof Dependencies)[]) => unknown[]; }; diff --git a/src/handler/events/dispatchers/dispatchers.ts b/src/handler/events/dispatchers/dispatchers.ts index e966c4c..2c0bbee 100644 --- a/src/handler/events/dispatchers/dispatchers.ts +++ b/src/handler/events/dispatchers/dispatchers.ts @@ -1,7 +1,7 @@ import type { Processed } from '../../../types/handler'; import type { AutocompleteInteraction } from 'discord.js'; -import { SernError } from '../../structures'; -import treeSearch from '../../utilities/treeSearch'; +import { SernError } from '../../../core/structures'; +import treeSearch from '../../../core/utilities/treeSearch'; import type { BothCommand, CommandModule, Module, SlashCommand } from '../../../types/module'; import { EventEmitter } from 'events'; import * as assert from 'assert'; diff --git a/src/handler/events/interactionHandler.ts b/src/handler/events/interactionHandler.ts index 1febb38..a2c9bf2 100644 --- a/src/handler/events/interactionHandler.ts +++ b/src/handler/events/interactionHandler.ts @@ -12,15 +12,15 @@ import { OperatorFunction, pipe, } from 'rxjs'; -import { CommandType, type ModuleStore, SernError } from '../structures'; +import { CommandType, type ModuleStore, SernError } from '../../core/structures'; import { contextArgs, dispatchAutocomplete, dispatchCommand, interactionArg } from './dispatchers'; import { executeModule, makeModuleExecutor } from './observableHandling'; import type { CommandModule } from '../../types/module'; -import { ErrorHandling, handleError } from '../contracts/errorHandling'; -import SernEmitter from '../sernEmitter'; +import { ErrorHandling, handleError } from '../../core/contracts/errorHandling'; +import { SernEmitter } from '../../core'; import type { Processed } from '../../types/handler'; -import { useContainerRaw } from '../dependencies'; -import type { Logging, ModuleManager } from '../contracts'; +import { useContainerRaw } from '../../core/dependencies'; +import type { Logging, ModuleManager } from '../../core/contracts'; import type { EventEmitter } from 'node:events'; function makeInteractionProcessor(