forked from engineering/cloudservices
fix issue
parent
33a9493a98
commit
6958d4d6b1
|
@ -29,12 +29,12 @@ export default class CWG_SelfService extends Command {
|
||||||
const account = await this.client.db.Account.findOne({ userID: message.author.id });
|
const account = await this.client.db.Account.findOne({ userID: message.author.id });
|
||||||
if (!account) return this.error(message.channel, 'Cannot locate account.');
|
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, 'The domain value you provided is invalid.');
|
||||||
|
|
||||||
if (!this.domainTextValidation(args[0])) return this.error(message.channel, 'Invalid domain.');
|
|
||||||
|
|
||||||
if (await this.client.db.Domain.exists({ domain: reqDomain })) return this.error(message.channel, 'This domain already exists.');
|
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 edit = await this.loading(message.channel, 'Binding domain...');
|
||||||
|
|
||||||
const certs: { cert?: string, key?: string } = {};
|
const certs: { cert?: string, key?: string } = {};
|
||||||
|
@ -72,7 +72,7 @@ export default class CWG_SelfService extends Command {
|
||||||
.setTimestamp(new Date(message.createdTimestamp));
|
.setTimestamp(new Date(message.createdTimestamp));
|
||||||
|
|
||||||
const completed = [
|
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.channels.cache.get('580950455581147146') as TextChannel).send({ embeds: [embed] }),
|
||||||
this.client.users.fetch(account.userID).then((r) => r.send({ embeds: [embed] })),
|
this.client.users.fetch(account.userID).then((r) => r.send({ embeds: [embed] })),
|
||||||
this.client.util.transport.sendMail({
|
this.client.util.transport.sendMail({
|
||||||
|
|
Loading…
Reference in New Issue