activity subscore nerf
parent
8fdfa2d05e
commit
8b4d7c1909
|
@ -123,7 +123,7 @@ export default class Internal extends Route {
|
||||||
else totalScore = `${score.total}`;
|
else totalScore = `${score.total}`;
|
||||||
|
|
||||||
if (score.activity < 10) activityScore = '---';
|
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}`;
|
else activityScore = `${score.activity}`;
|
||||||
|
|
||||||
if (score.roles <= 0) roleScore = '---';
|
if (score.roles <= 0) roleScore = '---';
|
||||||
|
|
|
@ -94,7 +94,7 @@ export default class Score extends Command {
|
||||||
else totalScore = `${score.total}`;
|
else totalScore = `${score.total}`;
|
||||||
|
|
||||||
if (score.activity < 10) activityScore = '---';
|
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}`;
|
else activityScore = `${score.activity}`;
|
||||||
|
|
||||||
if (score.roles <= 0) roleScore = '---';
|
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 >= 700) { color = '🟢'; additionalText = 'EXCELLENT'; embed.setColor('66FF66'); }
|
||||||
if (score.total >= 770) { color = '<a:excp:756975350998892574>'; additionalText = 'EXCEPTIONAL'; embed.setColor('#99FFFF'); }
|
if (score.total >= 770) { color = '<a:excp:756975350998892574>'; additionalText = 'EXCEPTIONAL'; embed.setColor('#99FFFF'); }
|
||||||
embed.addField('Total | 200 to 800', `${color} ${totalScore} | ${additionalText}`, true);
|
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('Roles | 1 to N/A', roleScore || 'N/C', true);
|
||||||
embed.addField('Moderation | N/A to 2' || 'N/C', moderationScore, true);
|
embed.addField('Moderation | N/A to 2' || 'N/C', moderationScore, true);
|
||||||
embed.addField('Cloud Services | N/A to 10+', cloudServicesScore || 'N/C', true);
|
embed.addField('Cloud Services | N/A to 10+', cloudServicesScore || 'N/C', true);
|
||||||
|
|
|
@ -21,7 +21,7 @@ export default async function calculateScore(client: Client): Promise<NodeJS.Tim
|
||||||
const start = async () => {
|
const start = async () => {
|
||||||
const { members } = client.guilds.get(client.config.guildID);
|
const { members } = client.guilds.get(client.config.guildID);
|
||||||
|
|
||||||
const general = await (<TextChannel> client.guilds.get(client.config.guildID).channels.get('485680288123584525')).getMessages(5000);
|
const general = await (<TextChannel> client.guilds.get(client.config.guildID).channels.get('485680288123584525')).getMessages(3000);
|
||||||
const media = await (<TextChannel> client.guilds.get(client.config.guildID).channels.get('508006539768889354')).getMessages(100);
|
const media = await (<TextChannel> client.guilds.get(client.config.guildID).channels.get('508006539768889354')).getMessages(100);
|
||||||
const programmingSupport = await (<TextChannel> client.guilds.get(client.config.guildID).channels.get('506970598631538708')).getMessages(300);
|
const programmingSupport = await (<TextChannel> client.guilds.get(client.config.guildID).channels.get('506970598631538708')).getMessages(300);
|
||||||
const cloudSupport = await (<TextChannel> client.guilds.get(client.config.guildID).channels.get('546457788184789013')).getMessages(200);
|
const cloudSupport = await (<TextChannel> client.guilds.get(client.config.guildID).channels.get('546457788184789013')).getMessages(200);
|
||||||
|
@ -91,14 +91,14 @@ export default async function calculateScore(client: Client): Promise<NodeJS.Tim
|
||||||
|
|
||||||
for (const msg of allMessagesArray.filter((m) => m.member?.id === member.id)) {
|
for (const msg of allMessagesArray.filter((m) => m.member?.id === member.id)) {
|
||||||
if (!msg.content) continue;
|
if (!msg.content) continue;
|
||||||
if (msg.content.length < 5) continue;
|
if (msg.content.length <= 5) continue;
|
||||||
// eslint-disable-next-line no-plusplus
|
// eslint-disable-next-line no-plusplus
|
||||||
messageCountTotal++;
|
messageCountTotal++;
|
||||||
}
|
}
|
||||||
|
|
||||||
const activityTotal = messageCountTotal;
|
const activityTotal = messageCountTotal;
|
||||||
activity = Math.floor(Math.log1p(activityTotal) * 12);
|
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;
|
if (member.roles.includes('446104438969466890') || member.roles.includes('701481967149121627')) staff = 20;
|
||||||
|
|
||||||
const response = <CSResponse> (await axios.get(`https://api.cloud.libraryofcode.org/wh/score?id=${member.user.id}&authorization=${client.config.internalKey}`)).data;
|
const response = <CSResponse> (await axios.get(`https://api.cloud.libraryofcode.org/wh/score?id=${member.user.id}&authorization=${client.config.internalKey}`)).data;
|
||||||
|
|
Loading…
Reference in New Issue