score calculations update
parent
1e1b257460
commit
32a7a554f1
|
@ -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)));
|
||||
|
|
|
@ -131,6 +131,16 @@ export default async function calculateScore(client: Client): Promise<NodeJS.Tim
|
|||
other = Math.floor(other * 1.15);
|
||||
}
|
||||
|
||||
const discordAccountCreatedAtTestDate = (new Date(new Date(new Date(member.user.createdAt)).setHours(730)));
|
||||
if (discordAccountCreatedAtTestDate > 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() } });
|
||||
|
|
Loading…
Reference in New Issue