diff --git a/src/commands/score.ts b/src/commands/score.ts index cdbed50..4afbc8b 100644 --- a/src/commands/score.ts +++ b/src/commands/score.ts @@ -123,7 +123,7 @@ export default class Score extends Command { break; } } */ - if (score.inquiries?.length > 0) { + if (score?.inquiries?.length > 0) { let desc = '__**Hard Inquiries**__\n*These inquiries will fall off your report within 3 months, try to keep your hard inquiries to a minimum. If you want to file a dispute, please DM Ramirez.*\n\n'; score.inquiries.forEach((inq) => { const testDate = (new Date(new Date(inq.date).setHours(2190))); diff --git a/src/intervals/score.ts b/src/intervals/score.ts index 978f38b..358f6a7 100644 --- a/src/intervals/score.ts +++ b/src/intervals/score.ts @@ -131,6 +131,16 @@ export default async function calculateScore(client: Client): Promise new Date()) { + other -= 10; + } + + const joinedAtTestDate = (new Date(new Date(new Date(member.joinedAt)).setHours(420))); + if (joinedAtTestDate > new Date()) { + other -= 30; + } + total = Math.floor(((total + activity + roles + moderation + cloudServices + staff + other) * 5.13) * 1.87); await score.updateOne({ $set: { total, activity, roles, moderation, cloudServices, other, staff, lastUpdate: new Date() } });