Fix variable name, sort imports

This commit is contained in:
Erik 2024-04-09 17:16:37 +03:00
parent 9cc8dfd61e
commit 8cb3956da5
4 changed files with 13 additions and 12 deletions

View File

@ -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
{

View File

@ -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
{

View File

@ -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

View File

@ -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);