diff --git a/src/commands/score.ts b/src/commands/score.ts index 92b34f0..142b3a1 100644 --- a/src/commands/score.ts +++ b/src/commands/score.ts @@ -84,14 +84,27 @@ export default class Score extends Command { const embed = new RichEmbed(); embed.setTitle('Community Score'); embed.setAuthor(member.user.username, member.user.avatarURL); + embed.setThumbnail(member.user.avatarURL); + /* for (const role of member.roles.map((r) => this.mainGuild.roles.get(r)).sort((a, b) => b.position - a.position)) { + if (role?.color !== 0) { + embed.setColor(role.color); + break; + } + } */ if (score.inquiries?.length > 0) { - let desc = ''; + 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) => { - desc += `**Department/Service:** ${inq.name}\n**Reason:** ${inq.reason}\n**Date:** ${inq.date.toLocaleString('en-us')} ET\n`; + const testDate = (new Date(new Date(inq.date).setHours(2190))); + if (testDate > inq.date) desc += `**Department/Service:** ${inq.name}\n**Reason:** ${inq.reason}\n**Date:** ${inq.date.toLocaleString('en-us')} ET\n\n`; }); embed.setDescription(desc); } - embed.addField('Total | 200 - 800', totalScore, true); + let color = '🔴'; + embed.setColor('FF0000'); + if (score.total >= 280) { color = '🟠'; embed.setColor('FFA500'); } + if (score.total >= 490) { color = '🟡'; embed.setColor('FFFF00'); } + if (score.total >= 600) { color = '🟢'; embed.setColor('66FF66'); } + embed.addField('Total | 200 - 800', `${color} ${totalScore}`, true); embed.addField(`Activity | 10 - ${Math.floor(Math.log1p(1000 + 300 + 200) * 12)}`, activityScore, true); embed.addField('Roles | 1 - 54', roleScore, true); embed.addField('Moderation | -50 - 2', moderationScore, true);