diff --git a/src/commands/score.ts b/src/commands/score.ts index cf0c566..b7feaa4 100644 --- a/src/commands/score.ts +++ b/src/commands/score.ts @@ -1,5 +1,6 @@ /* eslint-disable no-continue */ /* eslint-disable default-case */ +import moment from 'moment'; import { v4 as uuid } from 'uuid'; import { Message, User, TextChannel } from 'eris'; import { Client, Command, RichEmbed } from '../class'; @@ -164,7 +165,7 @@ export default class Score extends Command { score.inquiries.forEach((inq) => { const testDate = (new Date(new Date(inq.date).setHours(2190))); // eslint-disable-next-line no-useless-escape - if (testDate > new Date()) desc += `${inq.id ? `__[${inq.id}]__\n` : ''}**Department/Service:** ${inq.name.replace(/\*/gmi, '')}\n**Reason:** ${inq.reason}\n**Date:** ${inq.date.toLocaleString('en-us')} ET\n\n`; + if (testDate > new Date()) desc += `${inq.id ? `__[${inq.id}]__\n` : ''}**Department/Service:** ${inq.name.replace(/\*/gmi, '')}\n**Reason:** ${inq.reason}\n**Date:** ${inq.date.toLocaleString('en-us')} ET\n**Expires:** ${moment(testDate).fromNow()} | ${moment(testDate).calendar()}\n\n`; }); embed.setDescription(desc); }