fixes
parent
31705f0b70
commit
8c32801592
|
@ -7,8 +7,6 @@ import { promises as fs } from 'fs';
|
|||
import { Client, Collection, Context } from '.';
|
||||
import type { TCPHandler } from '.';
|
||||
|
||||
import * as handlerFiles from '../cscli/handlers';
|
||||
|
||||
export default class CSCLI {
|
||||
public client: Client;
|
||||
|
||||
|
@ -34,7 +32,7 @@ export default class CSCLI {
|
|||
this.init();
|
||||
}
|
||||
|
||||
public load() {
|
||||
public load(handlerFiles: { [s: string]: typeof TCPHandler; } | ArrayLike<typeof TCPHandler>) {
|
||||
const hdFiles = Object.values<typeof TCPHandler>(handlerFiles);
|
||||
for (const Handler of hdFiles) {
|
||||
const handler = new Handler();
|
||||
|
|
|
@ -8,6 +8,8 @@ import { Account, AccountInterface, Moderation, ModerationInterface, Domain, Dom
|
|||
import { emojis } from '../stores';
|
||||
import { Command, CSCLI, Util, Collection, Server, Event } from '.';
|
||||
|
||||
import * as handlerFiles from '../cscli';
|
||||
|
||||
|
||||
export default class Client extends Eris.Client {
|
||||
public config: { 'token': string; 'cloudflare': string; 'prefix': string; 'emailPass': string; 'mongoURL': string; 'port': number; 'keyPair': { 'publicKey': string; 'privateKey': string; }; vendorKey: string; internalKey: string; };
|
||||
|
@ -139,7 +141,8 @@ export default class Client extends Eris.Client {
|
|||
});
|
||||
this.server = new Server(this, { port: this.config.port });
|
||||
// eslint-disable-next-line no-new
|
||||
new CSCLI(this);
|
||||
const cscli = new CSCLI(this);
|
||||
cscli.load(handlerFiles);
|
||||
|
||||
const corepath = '/opt/CloudServices/dist';
|
||||
const cmdFiles = await fs.readdir('/opt/CloudServices/dist/commands');
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { TCPHandler, Context } from '../../class';
|
||||
import { TCPHandler, Context } from '../class';
|
||||
|
||||
export default class KillPID extends TCPHandler {
|
||||
constructor() {
|
|
@ -1,4 +1,4 @@
|
|||
import { TCPHandler, Context } from '../../class';
|
||||
import { TCPHandler, Context } from '../class';
|
||||
|
||||
export default class Lock extends TCPHandler {
|
||||
constructor() {
|
|
@ -1,4 +1,4 @@
|
|||
import { TCPHandler, Context } from '../../class';
|
||||
import { TCPHandler, Context } from '../class';
|
||||
|
||||
export default class ProcessCount extends TCPHandler {
|
||||
constructor() {
|
|
@ -1,5 +1,5 @@
|
|||
import { TCPHandler, Context } from '../../class';
|
||||
import { dataConversion } from '../../functions';
|
||||
import { TCPHandler, Context } from '../class';
|
||||
import { dataConversion } from '../functions';
|
||||
|
||||
export default class RAM extends TCPHandler {
|
||||
constructor() {
|
|
@ -1,4 +1,4 @@
|
|||
import { TCPHandler, Context } from '../../class';
|
||||
import { TCPHandler, Context } from '../class';
|
||||
|
||||
export default class RAMLimits extends TCPHandler {
|
||||
constructor() {
|
|
@ -1,4 +1,4 @@
|
|||
import { TCPHandler, Context, Report } from '../../class';
|
||||
import { TCPHandler, Context, Report } from '../class';
|
||||
|
||||
export default class Score extends TCPHandler {
|
||||
constructor() {
|
|
@ -1,4 +1,4 @@
|
|||
import { TCPHandler, Context } from '../../class';
|
||||
import { TCPHandler, Context } from '../class';
|
||||
|
||||
export default class SSHLogins extends TCPHandler {
|
||||
constructor() {
|
|
@ -1,5 +1,5 @@
|
|||
import { TCPHandler, Context } from '../../class';
|
||||
import { dataConversion } from '../../functions';
|
||||
import { TCPHandler, Context } from '../class';
|
||||
import { dataConversion } from '../functions';
|
||||
|
||||
export default class Storage extends TCPHandler {
|
||||
constructor() {
|
|
@ -1,4 +1,4 @@
|
|||
import { TCPHandler, Context } from '../../class';
|
||||
import { TCPHandler, Context } from '../class';
|
||||
|
||||
export default class UserInfo extends TCPHandler {
|
||||
constructor() {
|
Loading…
Reference in New Issue