From d7567ccb5a75796b036c601bbae4724e2f15fe29 Mon Sep 17 00:00:00 2001 From: Matthew Date: Thu, 9 Mar 2023 18:36:49 -0500 Subject: [PATCH] change tech full name --- src/class/Util.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/class/Util.ts b/src/class/Util.ts index 55091e2..4bf3246 100644 --- a/src/class/Util.ts +++ b/src/class/Util.ts @@ -313,11 +313,11 @@ export default class Util { public async getTechnicianFullName(tech: User) { if (!tech) throw new Error('\'tech\' is undefined.'); + if (tech.id === this.client.user.id) return 'SYSTEM'; const req = await axios.get('https://loc.sh/int/directory'); const find = req.data.find((mem) => mem.userID === tech.id); - if (tech.id === this.client.user.id) return 'SYSTEM'; - return `${tech.username}, ${find.pn.join(', ')} (<@${tech.id}>)`; + return `${tech.username}${find.isManager ? '[k]' : ''}${find.title ? ` (${find.title} / ${find.dept})` : ` (${find.dept})`} <<@${tech.id}>>`; } public parseCertificate(pem: string) {