diff --git a/src/commands/cwg_delete.ts b/src/commands/cwg_delete.ts index f142d10..53424c5 100644 --- a/src/commands/cwg_delete.ts +++ b/src/commands/cwg_delete.ts @@ -18,7 +18,7 @@ export default class CWG_Delete extends Command { public async run(message: Message, args: string[]) { try { if (!args[0]) return this.client.commands.get('help').run(message, ['cwg', this.name]); - const domain = await this.client.db.Domain.findOne({ $or: [{ domain: args[0] }, { port: Number(args[0]) || '' }] }); + const domain = await this.client.db.Domain.findOne({ $or: [{ domain: args[0] }, { port: Number(args[0]) || 0 }] }); if (!domain) return message.channel.createMessage(`***${this.client.stores.emojis.error} The domain or port you provided could not be found.***`); const edit = await message.channel.createMessage(`***${this.client.stores.emojis.loading} Deleting domain...***`); const embed = new RichEmbed(); diff --git a/src/commands/cwg_updatecert.ts b/src/commands/cwg_updatecert.ts index fa108e9..6c58ed2 100644 --- a/src/commands/cwg_updatecert.ts +++ b/src/commands/cwg_updatecert.ts @@ -18,7 +18,7 @@ export default class CWG_UpdateCert extends Command { public async run(message: Message, args: string[]) { try { if (!args[2]) return this.client.commands.get('help').run(message, ['cwg', this.name]); - const dom = await this.client.db.Domain.findOne({ $or: [{ domain: args[0] }, { port: Number(args[0]) || '' }] }); + const dom = await this.client.db.Domain.findOne({ $or: [{ domain: args[0] }, { port: Number(args[0]) || 0 }] }); if (!dom) return message.channel.createMessage(`***${this.client.stores.emojis.error} The domain or port you provided could not be found.***`); const { domain, port, x509, account } = dom; const { cert, key } = x509;