1
0
Fork 0

Added usage

refactor/models
Bsian 2019-10-29 01:13:14 +00:00
parent e784b124e8
commit 36afa4f2ed
No known key found for this signature in database
GPG Key ID: 097FB9A291026091
1 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ export default class CWG extends Command {
super(client); super(client);
this.name = 'cwg'; this.name = 'cwg';
this.description = 'Manages aspects for the CWG.'; this.description = 'Manages aspects for the CWG.';
this.usage = `${this.client.config.prefix}cwg create [User ID/Username] [Domain] [Port] <Path to x509 certificate> <Path to x509 key>`; this.usage = `${this.client.config.prefix}cwg create [User ID/Username] [Domain] [Port] <Path to x509 cert> <Path to x509 key>\n${this.client.config.prefix}cwg data [Domain/Port]`;
this.permissions = { roles: ['525441307037007902'] }; this.permissions = { roles: ['525441307037007902'] };
this.enabled = true; this.enabled = true;
} }
@ -85,7 +85,7 @@ export default class CWG extends Command {
} }
} else if (args[0] === 'data') { } else if (args[0] === 'data') {
if (!args[1]) return this.client.commands.get('help').run(message, [this.name]); if (!args[1]) return this.client.commands.get('help').run(message, [this.name]);
const domain = await this.client.db.Domain.findOne({ $or: [{ domain: args[1] }, { port: Number(args[1]) ? Number(args[1]) : '' }] }); const domain = await this.client.db.Domain.findOne({ $or: [{ domain: args[1] }, { port: Number(args[1]) || '' }] });
if (!domain) return message.channel.createMessage(`***${this.client.stores.emojis.error} The domain or port you provided could not be found.***`); if (!domain) return message.channel.createMessage(`***${this.client.stores.emojis.error} The domain or port you provided could not be found.***`);
const embed = new RichEmbed(); const embed = new RichEmbed();
embed.setTitle('Domain Information'); embed.setTitle('Domain Information');