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) {