From 420e1f8d2e5885f98120c3a977b8abafe5230bdc Mon Sep 17 00:00:00 2001 From: Matthew R Date: Sat, 26 Oct 2019 00:01:16 -0400 Subject: [PATCH] [WIP] cwg command for nginx handling --- src/commands/cwg.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/commands/cwg.ts b/src/commands/cwg.ts index 2e2503c..b4c0982 100644 --- a/src/commands/cwg.ts +++ b/src/commands/cwg.ts @@ -31,7 +31,7 @@ export default class CWG extends Command { const embed = new RichEmbed(); embed.setTitle('Domain Creation'); embed.setColor(3066993); - embed.addField('Account Username', account.account, true); + embed.addField('Account Username', account.username, true); embed.addField('Account ID', account.id, true); embed.addField('Engineer', `<@${message.author.id}>`, true); embed.addField('Domain', domain.domain, true); @@ -62,7 +62,8 @@ export default class CWG extends Command { Responsible Engineer: ${message.author.username}#${message.author.discriminator} If you have any questions about additional setup, you can reply to this email or send a message in #cloud-support in our Discord server. - Thanks. + + Library of Code sp-us | Support Team `, }); if (!domain.domain.includes('cloud.libraryofcode.org')) { @@ -88,7 +89,7 @@ export default class CWG extends Command { if (port <= 1024 || port >= 65535) throw new RangeError(`Port range must be between 1024 and 65535, received ${port}.`); if (await this.client.db.Domain.exists({ port })) throw new Error(`Port ${port} already exists in the database.`); if (await this.client.db.Domain.exists({ domain })) throw new Error(`Domain ${domain} already exists in the database.`); - if (!await this.client.db.Account.exists({ userID: account.userID })) throw new Error(`Cannot find account ${account.id}.`); + if (!await this.client.db.Account.exists({ userID: account.userID })) throw new Error(`Cannot find account ${account.userID}.`); await fs.access(x509Certificate.cert, fs.constants.R_OK); await fs.access(x509Certificate.key, fs.constants.R_OK); let config = await fs.readFile('./static/nginx.conf', { encoding: 'utf8' });