fixes
parent
40c38ba299
commit
8c55efd7e3
|
@ -92,7 +92,7 @@ export default class Score extends Command {
|
|||
const mem = this.client.util.resolveMember(score.userID, this.client.guilds.get(this.client.config.guildID));
|
||||
embed.addField('Member', `${mem.user.username}#${mem.user.discriminator} | <@${score.userID}>`, true);
|
||||
embed.addField('Type', 'HARD', true);
|
||||
embed.addField('Department/Service', name, true);
|
||||
embed.addField('Department/Service', name.toUpperCase(), true);
|
||||
embed.addField('Reason', reason ?? 'N/A', true);
|
||||
embed.setTimestamp();
|
||||
embed.setFooter(this.client.user.username, this.client.user.avatarURL);
|
||||
|
@ -151,7 +151,7 @@ export default class Score extends Command {
|
|||
}
|
||||
const percentile = this.client.util.percentile(set, score.total);
|
||||
const embed = new RichEmbed();
|
||||
embed.setTitle('Community Score');
|
||||
embed.setTitle('Community Report');
|
||||
embed.setAuthor(user.username, user.avatarURL);
|
||||
embed.setThumbnail(user.avatarURL);
|
||||
/* for (const role of member.roles.map((r) => this.mainGuild.roles.get(r)).sort((a, b) => b.position - a.position)) {
|
||||
|
@ -176,7 +176,7 @@ export default class Score extends Command {
|
|||
if (score.total >= 630) { color = '🟡'; additionalText = 'GOOD'; embed.setColor('FFFF00'); }
|
||||
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', score ? `${color} ${totalScore} | ${additionalText} | ${this.client.util.ordinal(Math.round(percentile))} Percentile` : 'N/C', true);
|
||||
embed.addField('CommScore™ | 200 to 800', score ? `${color} ${totalScore} | ${additionalText} | ${this.client.util.ordinal(Math.round(percentile))} Percentile` : '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);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* eslint-disable no-bitwise */
|
||||
import moment from 'moment';
|
||||
import { Message, Member } from 'eris';
|
||||
import { Message, Member, TextChannel } from 'eris';
|
||||
import { Client, Command, RichEmbed } from '../class';
|
||||
// import acknowledgements from '../configs/acknowledgements.json';
|
||||
import { whois as emotes } from '../configs/emotes.json';
|
||||
|
@ -81,6 +81,17 @@ export default class Whois extends Command {
|
|||
const score = await this.client.db.Score.findOne({ userID: member.id });
|
||||
if (score) {
|
||||
await this.client.db.Score.updateOne({ userID: member.id }, { $addToSet: { softInquiries: { name: 'Library of Code sp-us | Bureau of Community Reports', date: new Date() } } });
|
||||
const embed2 = new RichEmbed();
|
||||
embed2.setTitle('Inquiry Notification');
|
||||
embed2.setColor('#00FFFF');
|
||||
const mem = this.client.util.resolveMember(score.userID, this.client.guilds.get(this.client.config.guildID));
|
||||
embed2.addField('Member', `${mem.user.username}#${mem.user.discriminator} | <@${score.userID}>`, true);
|
||||
embed2.addField('Type', 'SOFT', true);
|
||||
embed2.addField('Department/Service', 'Library of Code sp-us | Bureau of Community Reports'.toUpperCase(), true);
|
||||
embed2.setTimestamp();
|
||||
embed2.setFooter(this.client.user.username, this.client.user.avatarURL);
|
||||
const log = <TextChannel> this.client.guilds.get(this.client.config.guildID).channels.get('611584771356622849');
|
||||
log.createMessage({ embed: embed2 }).catch(() => {});
|
||||
let totalScore = '0';
|
||||
if (score.total < 200) totalScore = '---';
|
||||
else if (score.total > 800) totalScore = '800';
|
||||
|
|
Loading…
Reference in New Issue