diff --git a/src/commands/createaccount.ts b/src/commands/createaccount.ts index f9a8b99..d630bb8 100644 --- a/src/commands/createaccount.ts +++ b/src/commands/createaccount.ts @@ -1,6 +1,6 @@ import { Message, PrivateChannel } from 'eris'; import uuid from 'uuid/v4'; -import { Client, config } from '..'; +import { Client } from '..'; import { Command, RichEmbed } from '../class'; export default class CreateAccount extends Command { @@ -8,7 +8,7 @@ export default class CreateAccount extends Command { super(client); this.name = 'createaccount'; this.description = 'Create an account on the Cloud VM'; - this.usage = `${config.prefix}createaccount [User ID] [Email] [Account name]`; + this.usage = `${this.client.config.prefix}createaccount [User ID] [Email] [Account name]`; this.aliases = ['createacc', 'cacc', 'caccount', 'create']; this.permissions = { roles: ['475817826251440128', '525441307037007902'] }; this.enabled = true; diff --git a/src/commands/cwg.ts b/src/commands/cwg.ts index 9790c97..28e5f22 100644 --- a/src/commands/cwg.ts +++ b/src/commands/cwg.ts @@ -4,14 +4,14 @@ import x509 from '@ghaiklor/x509'; import { Message } from 'eris'; import { AccountInterface } from '../models'; import { Command, RichEmbed } from '../class'; -import { Client, config } from '..'; +import { Client } from '..'; export default class CWG extends Command { constructor(client: Client) { super(client); this.name = 'cwg'; this.description = 'Manages aspects for the CWG.'; - this.usage = `${config.prefix}cwg [User ID/Username] [Domain] [Port] `; + this.usage = `${this.client.config.prefix}cwg [User ID/Username] [Domain] [Port] `; this.permissions = { roles: ['525441307037007902'] }; this.enabled = true; } @@ -99,7 +99,7 @@ export default class CWG extends Command { cfg = cfg.replace(/\[PORT]/g, String(port)); cfg = cfg.replace(/\[CERTIFICATE]/g, x509Certificate.cert); cfg = cfg.replace(/\[KEY]/g, x509Certificate.key); - await fs.writeFile(`/etc/nginx/sites-available/${domain}`, config, { encoding: 'utf8' }); + await fs.writeFile(`/etc/nginx/sites-available/${domain}`, cfg, { encoding: 'utf8' }); await fs.symlink(`/etc/nginx/sites-available/${domain}`, `/etc/nginx/sites-enabled/${domain}`); const entry = new this.client.db.Domain({ account, diff --git a/src/commands/deleteaccount.ts b/src/commands/deleteaccount.ts index 120c9c5..e778e1f 100644 --- a/src/commands/deleteaccount.ts +++ b/src/commands/deleteaccount.ts @@ -1,14 +1,14 @@ import { Message, PrivateChannel } from 'eris'; import uuid from 'uuid/v4'; import { Command, RichEmbed } from '../class'; -import { Client, config } from '..'; +import { Client } from '..'; export default class DeleteAccount extends Command { constructor(client: Client) { super(client); this.name = 'deleteaccount'; this.description = 'Delete an account on the Cloud VM'; - this.usage = `${config.prefix}deleteaccount [User ID] [Reason] | ${config.prefix}deleteaccount [Username] [Reason] | ${config.prefix}deleteaccount [Email] [Reason]`; + this.usage = `${this.client.config.prefix}deleteaccount [User ID] [Reason] | ${this.client.config.prefix}deleteaccount [Username] [Reason] | ${this.client.config.prefix}deleteaccount [Email] [Reason]`; this.aliases = ['deleteacc', 'dacc', 'daccount', 'delete']; this.permissions = { roles: ['475817826251440128', '525441307037007902'] }; this.enabled = true;