diff --git a/util/Formatters.ts b/util/Formatters.ts index 7e37c19..a0d4e9f 100644 --- a/util/Formatters.ts +++ b/util/Formatters.ts @@ -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]`,