remove redundant variables
parent
1dba55f0a6
commit
3cd15fcdad
|
@ -10,9 +10,9 @@ export function getTotalMessageCount(client: Client): number {
|
||||||
projectChannels.push(chan);
|
projectChannels.push(chan);
|
||||||
}
|
}
|
||||||
return (projectChannels.length * 200) + 2200 + 300 + 100 + 200;
|
return (projectChannels.length * 200) + 2200 + 300 + 100 + 200;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default async function(client: Client, member: Member, allMessagesArray: Message<TextChannel>[]) {
|
export default async function calculateReport(client: Client, member: Member, allMessagesArray: Message<TextChannel>[]) {
|
||||||
if (member.bot) return;
|
if (member.bot) return;
|
||||||
let score = await client.db.mongo.Score.findOne({ userID: member.user.id });
|
let score = await client.db.mongo.Score.findOne({ userID: member.user.id });
|
||||||
if (!score) {
|
if (!score) {
|
||||||
|
@ -50,8 +50,13 @@ export default async function(client: Client, member: Member, allMessagesArray:
|
||||||
// eslint-disable-next-line prefer-const
|
// eslint-disable-next-line prefer-const
|
||||||
// eslint-disable-next-line one-var-declaration-per-line
|
// eslint-disable-next-line one-var-declaration-per-line
|
||||||
// eslint-disable-next-line one-var
|
// eslint-disable-next-line one-var
|
||||||
let total = 0, activity = 0, roles = 0, moderation = 0, cloudServices = 0, other = 0, staff = 0;
|
let total = 0,
|
||||||
cloudServices = 0;
|
activity = 0,
|
||||||
|
roles = 0,
|
||||||
|
moderation = 0,
|
||||||
|
cloudServices = 0,
|
||||||
|
other = 0,
|
||||||
|
staff = 0;
|
||||||
|
|
||||||
roles = Math.floor(member.roles.length * 0.50);
|
roles = Math.floor(member.roles.length * 0.50);
|
||||||
if (roles > 54) roles = 54;
|
if (roles > 54) roles = 54;
|
||||||
|
|
Loading…
Reference in New Issue