forked from engineering/cloudservices
text changes
parent
a9a70080cb
commit
374dd04e0a
|
@ -311,6 +311,15 @@ export default class Util {
|
||||||
return Promise.resolve(log);
|
return Promise.resolve(log);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async getTechnicianFullName(tech: User) {
|
||||||
|
if (!tech) throw new Error('\'tech\' is undefined.');
|
||||||
|
|
||||||
|
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}>)`;
|
||||||
|
}
|
||||||
|
|
||||||
public parseCertificate(pem: string) {
|
public parseCertificate(pem: string) {
|
||||||
return axios.post<Certificate>('https://certapi.libraryofcode.org/parse', pem)
|
return axios.post<Certificate>('https://certapi.libraryofcode.org/parse', pem)
|
||||||
.then((response) => response.data);
|
.then((response) => response.data);
|
||||||
|
|
|
@ -32,7 +32,7 @@ export default class Tier extends Command {
|
||||||
embed.setTitle('Cloud Account | Tier Change');
|
embed.setTitle('Cloud Account | Tier Change');
|
||||||
embed.setColor('#0099ff');
|
embed.setColor('#0099ff');
|
||||||
embed.addField('User', `${account.username} | <@${account.userID}>`, true);
|
embed.addField('User', `${account.username} | <@${account.userID}>`, true);
|
||||||
embed.addField('Technician', message.author.toString(), true);
|
embed.addField('Technician', await this.client.util.getTechnicianFullName(message.author), true);
|
||||||
embed.addField('Old Tier -> New Tier', `${account.tier} -> ${args[1]}`, true);
|
embed.addField('Old Tier -> New Tier', `${account.tier} -> ${args[1]}`, true);
|
||||||
embed.setFooter(this.client.user.username, this.client.user.avatarURL());
|
embed.setFooter(this.client.user.username, this.client.user.avatarURL());
|
||||||
embed.setTimestamp();
|
embed.setTimestamp();
|
||||||
|
|
Loading…
Reference in New Issue