changes to Formatters.ts

master
Matthew 2025-01-30 21:33:06 -05:00
parent 28d0a2d485
commit 51c9d14dc1
Signed by: matthew
SSH Key Fingerprint: SHA256:piIXekA9q1p0ZGi4ogFbNY1embip5Ytbi3v8AZ8UYq4
1 changed files with 12 additions and 3 deletions

View File

@ -25,14 +25,23 @@ export default class Formatters {
console.debug(
`[MemberUtil] Formatting name for ${target.displayName} at url ${target instanceof GuildMember ? target.user.displayAvatarURL() : target.displayAvatarURL()}`
);
// if the role type is managerial, add a [k] to the end of the name
// if the partner is designated as a KeyHolder, add a [k] to the end of the name
// if the partner exists, set the iconURL to the organizational logo
if (partner?.roleType == PartnerRoleType.MANAGERIAL) {
if (partner?.isKeyHolder) {
return {
text: `${target.displayName} [k]`,
iconURL: target.displayAvatarURL(),
};
} else if (partner?.commissionType == PartnerCommissionType.CONTRACTUAL) {
} else if (partner?.roleType === PartnerRoleType.MANAGERIAL) {
// if a partner is of RoleType MANAGERIAL, add [m] to their name
return {
text: `${target.displayName} [m]`,
iconURL:
target instanceof GuildMember
? target.user.displayAvatarURL()
: target.displayAvatarURL(),
};
} else if (partner?.commissionType === PartnerCommissionType.CONTRACTUAL) {
// if the commission type is contractual, add a [c] to the end of the name
return {
text: `${target.displayName} [c]`,