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