diff --git a/src/commands/whois.ts b/src/commands/whois.ts index 32a3c9c..ce52fec 100644 --- a/src/commands/whois.ts +++ b/src/commands/whois.ts @@ -15,6 +15,15 @@ export default class Whois extends Command { this.enabled = true; } + public memberPostNominals(member: Member): string[] | false { + const arr = []; + if (member.roles.includes('858049948401401866')) arr.push('RCA'); + if (member.roles.includes('506943223680466955')) arr.push('PRF-C'); + + if (arr.length <= 0) return false; + return arr; + } + public async run(message: Message, args: string[]) { try { let member: Member; @@ -34,7 +43,11 @@ export default class Whois extends Command { const embed = new RichEmbed(); embed.setThumbnail(member.avatarURL); const ackResolve = await this.client.db.Staff.findOne({ userID: member.id }).lean().exec(); + const mpn = this.memberPostNominals(member); let title = `${member.user.username}#${member.user.discriminator}`; + if (!ackResolve && mpn) { + title += `, ${mpn.join(', ')}`; + } if (ackResolve?.pn?.length > 0) title += `, ${ackResolve.pn.join(', ')}`; embed.setAuthor(title, member.user.avatarURL);