From e784b124e863ba8f2d2d75c362b7190fa0011abc Mon Sep 17 00:00:00 2001 From: Matthew R Date: Mon, 28 Oct 2019 20:40:24 -0400 Subject: [PATCH] edit responses for cwg and add data command --- src/commands/cwg.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/cwg.ts b/src/commands/cwg.ts index f1d0364..e4ddb9c 100644 --- a/src/commands/cwg.ts +++ b/src/commands/cwg.ts @@ -85,7 +85,7 @@ export default class CWG extends Command { } } else if (args[0] === 'data') { 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]) }] }); + const domain = await this.client.db.Domain.findOne({ $or: [{ domain: args[1] }, { port: Number(args[1]) ? Number(args[1]) : '' }] }); 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(); embed.setTitle('Domain Information');