diff --git a/src/client/Client.ts b/src/client/Client.ts index 1909d1f..01212f1 100644 --- a/src/client/Client.ts +++ b/src/client/Client.ts @@ -1,12 +1,12 @@ +import { EventEmitter } from 'node:events'; +import { LoggerClient, LoggerClientOptions } from '@navy.gif/logger'; +import Registry from './components/Registry.js'; +import Intercom from './components/Intercom.js'; +import Util from '../utilities/Util.js'; import { IPCMessage } from '../../@types/Shared.js'; import { ClientOptions } from '../../@types/Client.js'; -import Util from '../utilities/Util.js'; -import Intercom from './components/Intercom.js'; -import { LoggerClient, LoggerClientOptions } from '@navy.gif/logger'; -import Registry from './components/Registry.js'; -import { EventEmitter } from 'node:events'; class Client extends EventEmitter { diff --git a/src/client/components/Registry.ts b/src/client/components/Registry.ts index c2661fd..9437b0f 100644 --- a/src/client/components/Registry.ts +++ b/src/client/components/Registry.ts @@ -3,11 +3,10 @@ import path from 'node:path'; import { LoggerClient } from '@navy.gif/logger'; import Client from '../Client.js'; -import { ExtendedMap } from '../../utilities/ExtendedMap.js'; import Component from '../interfaces/Component.js'; -import Util from '../../utilities/Util.js'; import { isInitialisable } from '../interfaces/Initialisable.js'; - +import Util from '../../utilities/Util.js'; +import { ExtendedMap } from '../../utilities/ExtendedMap.js'; class Registry { diff --git a/src/client/interfaces/Component.ts b/src/client/interfaces/Component.ts index b19e233..2d58e5e 100644 --- a/src/client/interfaces/Component.ts +++ b/src/client/interfaces/Component.ts @@ -1,6 +1,7 @@ -import { ComponentOptions } from '../../../@types/Client.js'; import Client from '../Client.js'; +import { ComponentOptions } from '../../../@types/Client.js'; + export enum ComponentType { EDIT_ME diff --git a/src/middleware/Controller.ts b/src/middleware/Controller.ts index f0c1080..5812299 100644 --- a/src/middleware/Controller.ts +++ b/src/middleware/Controller.ts @@ -7,6 +7,7 @@ import { MasterLogger } from '@navy.gif/logger'; import Shard from './Shard.js'; import Util from '../utilities/Util.js'; import { ExtendedMap } from '../utilities/ExtendedMap.js'; + import { ShardMethod } from '../../@types/Shard.js'; import { ControllerOptions, ShardingOptions } from '../../@types/Controller.js'; @@ -114,10 +115,10 @@ class Controller const ids = this.#shards.map(s => s.id); const id = ids.length ? Math.max(...ids) + 1 : 0; - const { path: file, respawn, execArgv, scriptArgs: args, clientOptions: discordOptions } = this.#shardingOptions; + const { path: file, respawn, execArgv, scriptArgs: args, clientOptions } = this.#shardingOptions; if (!file) throw new Error('File seems to be missing'); - if (!discordOptions) + if (!clientOptions) throw new Error('Missing discord options'); const shard = new Shard(this, id, { file, @@ -125,7 +126,7 @@ class Controller args, execArgv, totalShards, - clientOptions: discordOptions + clientOptions }); this.#shards.set(shard.id, shard); this.#logger.attach(shard);