From 51c9d14dc1ff11418d33a6512a401ea892f82a73 Mon Sep 17 00:00:00 2001 From: Matthew Date: Thu, 30 Jan 2025 21:33:06 -0500 Subject: [PATCH] changes to Formatters.ts --- util/Formatters.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) 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]`,