changes to Formatters.ts
parent
28d0a2d485
commit
51c9d14dc1
|
@ -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]`,
|
||||
|
|
Loading…
Reference in New Issue