diff --git a/src/api/loc.sh/routes/internal.ts b/src/api/loc.sh/routes/internal.ts index 178bd3f..c3eacd8 100644 --- a/src/api/loc.sh/routes/internal.ts +++ b/src/api/loc.sh/routes/internal.ts @@ -123,7 +123,7 @@ export default class Internal extends Route { else totalScore = `${score.total}`; if (score.activity < 10) activityScore = '---'; - else if (score.activity > Math.floor((Math.log1p(5000 + 300 + 200 + 100) * 12))) activityScore = String(Math.floor((Math.log1p(5000 + 300 + 200 + 100) * 12))); + else if (score.activity > Math.floor((Math.log1p(3000 + 300 + 200 + 100) * 12))) activityScore = String(Math.floor((Math.log1p(3000 + 300 + 200 + 100) * 12))); else activityScore = `${score.activity}`; if (score.roles <= 0) roleScore = '---'; diff --git a/src/commands/score.ts b/src/commands/score.ts index 82c5452..98864ae 100644 --- a/src/commands/score.ts +++ b/src/commands/score.ts @@ -94,7 +94,7 @@ export default class Score extends Command { else totalScore = `${score.total}`; if (score.activity < 10) activityScore = '---'; - else if (score.activity > Math.floor((Math.log1p(5000 + 300 + 200 + 100) * 12))) activityScore = String(Math.floor((Math.log1p(5000 + 300 + 200 + 100) * 12))); + else if (score.activity > Math.floor((Math.log1p(3000 + 300 + 200 + 100) * 12))) activityScore = String(Math.floor((Math.log1p(3000 + 300 + 200 + 100) * 12))); else activityScore = `${score.activity}`; if (score.roles <= 0) roleScore = '---'; @@ -140,7 +140,7 @@ export default class Score extends Command { if (score.total >= 700) { color = '🟢'; additionalText = 'EXCELLENT'; embed.setColor('66FF66'); } if (score.total >= 770) { color = ''; additionalText = 'EXCEPTIONAL'; embed.setColor('#99FFFF'); } embed.addField('Total | 200 to 800', `${color} ${totalScore} | ${additionalText}`, true); - embed.addField(`Activity | 10 to ${Math.floor(Math.log1p(5000 + 300 + 200 + 100) * 12)}`, activityScore || 'N/C', true); + embed.addField(`Activity | 10 to ${Math.floor(Math.log1p(3000 + 300 + 200 + 100) * 12)}`, activityScore || 'N/C', true); embed.addField('Roles | 1 to N/A', roleScore || 'N/C', true); embed.addField('Moderation | N/A to 2' || 'N/C', moderationScore, true); embed.addField('Cloud Services | N/A to 10+', cloudServicesScore || 'N/C', true); diff --git a/src/intervals/score.ts b/src/intervals/score.ts index db626df..bb2c144 100644 --- a/src/intervals/score.ts +++ b/src/intervals/score.ts @@ -21,7 +21,7 @@ export default async function calculateScore(client: Client): Promise { const { members } = client.guilds.get(client.config.guildID); - const general = await ( client.guilds.get(client.config.guildID).channels.get('485680288123584525')).getMessages(5000); + const general = await ( client.guilds.get(client.config.guildID).channels.get('485680288123584525')).getMessages(3000); const media = await ( client.guilds.get(client.config.guildID).channels.get('508006539768889354')).getMessages(100); const programmingSupport = await ( client.guilds.get(client.config.guildID).channels.get('506970598631538708')).getMessages(300); const cloudSupport = await ( client.guilds.get(client.config.guildID).channels.get('546457788184789013')).getMessages(200); @@ -91,14 +91,14 @@ export default async function calculateScore(client: Client): Promise m.member?.id === member.id)) { if (!msg.content) continue; - if (msg.content.length < 5) continue; + if (msg.content.length <= 5) continue; // eslint-disable-next-line no-plusplus messageCountTotal++; } const activityTotal = messageCountTotal; activity = Math.floor(Math.log1p(activityTotal) * 12); - if (activity > (Math.log1p(5000 + 300 + 200) * 12 + 100)) activity = Math.floor((Math.log1p(5000 + 300 + 200 + 100) * 12)); + if (activity > (Math.log1p(3000 + 300 + 200) * 12 + 100)) activity = Math.floor((Math.log1p(3000 + 300 + 200 + 100) * 12)); if (member.roles.includes('446104438969466890') || member.roles.includes('701481967149121627')) staff = 20; const response = (await axios.get(`https://api.cloud.libraryofcode.org/wh/score?id=${member.user.id}&authorization=${client.config.internalKey}`)).data;