From 6958d4d6b1ab8bc5e549b2c6f6ac06e4c50fbb1d Mon Sep 17 00:00:00 2001 From: Matthew R Date: Tue, 1 Mar 2022 15:17:56 -0500 Subject: [PATCH] fix issue --- src/commands/cwg_selfserv.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/commands/cwg_selfserv.ts b/src/commands/cwg_selfserv.ts index 2ebd84b..123cad3 100644 --- a/src/commands/cwg_selfserv.ts +++ b/src/commands/cwg_selfserv.ts @@ -29,12 +29,12 @@ export default class CWG_SelfService extends Command { const account = await this.client.db.Account.findOne({ userID: message.author.id }); if (!account) return this.error(message.channel, 'Cannot locate account.'); - if (await this.checkAuthorizationToken(message.author.id, args[1]) !== true) return this.error(message.channel, 'The authentication token provided is invalid.'); - - if (!this.domainTextValidation(args[0])) return this.error(message.channel, 'Invalid domain.'); + if (!this.domainTextValidation(args[0])) return this.error(message.channel, 'The domain value you provided is invalid.'); if (await this.client.db.Domain.exists({ domain: reqDomain })) return this.error(message.channel, 'This domain already exists.'); + if (await this.checkAuthorizationToken(message.author.id, args[1]) !== true) return this.error(message.channel, 'Permission denied.'); + const edit = await this.loading(message.channel, 'Binding domain...'); const certs: { cert?: string, key?: string } = {}; @@ -72,7 +72,7 @@ export default class CWG_SelfService extends Command { .setTimestamp(new Date(message.createdTimestamp)); const completed = [ - edit.edit(`***${this.client.stores.emojis.success} Your subdomain has been created, please check your DMs or email address for more information.`), + edit.edit(`***${this.client.stores.emojis.success} Your subdomain has been created, please check your DMs or email address for more information.***`), (this.client.channels.cache.get('580950455581147146') as TextChannel).send({ embeds: [embed] }), this.client.users.fetch(account.userID).then((r) => r.send({ embeds: [embed] })), this.client.util.transport.sendMail({