From e4a63cbf30e1a40dbcc3bc3d479fb2e62b70ab5b Mon Sep 17 00:00:00 2001 From: Matthew R Date: Sun, 11 Apr 2021 15:55:02 -0400 Subject: [PATCH] fix inquiry OS modifications --- src/intervals/score.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/intervals/score.ts b/src/intervals/score.ts index 1aa9065..d412490 100644 --- a/src/intervals/score.ts +++ b/src/intervals/score.ts @@ -156,7 +156,9 @@ export default async function calculateScore(client: Client): Promise 0) { + const inquiries = await client.db.Inquiry.find({ userID: member.user.id }).lean().exec(); + + if (inquiries?.length > 0) { for (const inq of score.inquiries) { const testDate = (new Date(new Date(inq.date).setHours(1460))); if (testDate > new Date()) other -= 1.65;