From 7337f7702717dfa72e9dfa76949952aee59d80dd Mon Sep 17 00:00:00 2001 From: Matthew Date: Sun, 7 Jan 2024 13:45:25 -0500 Subject: [PATCH] fix attempt x3 --- src/class/Util.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/class/Util.ts b/src/class/Util.ts index c4483be..56cca06 100644 --- a/src/class/Util.ts +++ b/src/class/Util.ts @@ -316,11 +316,12 @@ export default class Util { } public async getTechnicianName(tech: User, format: TechnicianNameFormatOpt = TechnicianNameFormatOpt.Full) { - if (!tech) return 'SYSTEM (U)'; - if (tech.id === this.client.user.id) return 'SYSTEM (S)'; + if (!tech) return 'SYSTEM (UT)'; + if (tech.id === this.client.user.id) return 'SYSTEM (SELF)'; const req = await axios.get('https://loc.sh/int/directory'); const find = req.data.find((mem) => mem.userID === tech.id); + if (!find) return 'SYSTEM (UF)'; if (format === TechnicianNameFormatOpt.Full) { return `${tech.username}${find.isManager ? ' [k]' : ''}${find.title ? ` (${find.title} / ${find.dept})` : ` (${find.dept})`} <<@${tech.id}>>`; } else if (format === TechnicianNameFormatOpt.Partial) {