From 46778ec7f1e1958496761063268f7b6a93dec036 Mon Sep 17 00:00:00 2001 From: Matthew R Date: Tue, 2 Feb 2021 02:14:00 -0500 Subject: [PATCH] fixes --- src/commands/score.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/commands/score.ts b/src/commands/score.ts index 2587906..d829658 100644 --- a/src/commands/score.ts +++ b/src/commands/score.ts @@ -113,8 +113,10 @@ export default class Score extends Command { inqs.forEach((inq) => { const testDate = (new Date(new Date(inq.date).setHours(1460))); // eslint-disable-next-line no-useless-escape - if (testDate > new Date()) desc += `${inq.iid ? `__[${inq.iid}]__\n` : ''}**Department/Service:** ${inq.name.replace(/\*/gmi, '')}\n**Reason:** ${inq.reason}\n**Date:** ${inq.date.toLocaleString('en-us')} ET\n**Expires:** ${moment(testDate).calendar()}\n\n`; - inqAdded++; + if (testDate > new Date()) { + desc += `${inq.iid ? `__[${inq.iid}]__\n` : ''}**Department/Service:** ${inq.name.replace(/\*/gmi, '')}\n**Reason:** ${inq.reason}\n**Date:** ${inq.date.toLocaleString('en-us')}\n**Expires:** ${moment(testDate).calendar()}\n\n`; + inqAdded++; + } }); if (inqAdded <= 0) desc = ''; if (desc.length >= 1900) {