badge thumbnails and different emotes for whois
parent
cbc06a508d
commit
d922b15475
|
@ -3,6 +3,7 @@ import moment from 'moment';
|
||||||
import { Message, Member } from 'eris';
|
import { Message, Member } from 'eris';
|
||||||
import { Client, Command, RichEmbed } from '../class';
|
import { Client, Command, RichEmbed } from '../class';
|
||||||
import acknowledgements from '../configs/acknowledgements.json';
|
import acknowledgements from '../configs/acknowledgements.json';
|
||||||
|
import { whois as emotes } from '../configs/emotes.json';
|
||||||
|
|
||||||
export default class Whois extends Command {
|
export default class Whois extends Command {
|
||||||
constructor(client: Client) {
|
constructor(client: Client) {
|
||||||
|
@ -26,23 +27,31 @@ export default class Whois extends Command {
|
||||||
}
|
}
|
||||||
const embed = new RichEmbed();
|
const embed = new RichEmbed();
|
||||||
embed.setAuthor(`${member.user.username}#${member.user.discriminator}`, member.user.avatarURL);
|
embed.setAuthor(`${member.user.username}#${member.user.discriminator}`, member.user.avatarURL);
|
||||||
|
if (member.roles.includes('453689940140883988')) {
|
||||||
|
embed.setThumbnail('https://static.libraryofcode.org/library_of_code_associate-badge.png');
|
||||||
|
} else if (member.roles.includes('455972169449734144')) {
|
||||||
|
embed.setThumbnail('https://static.libraryofcode.org/library_of_code_sheriff-badge.png');
|
||||||
|
} else if (member.roles.includes('662163685439045632')) {
|
||||||
|
embed.setThumbnail('https://static.libraryofcode.org/library_of_code_marshal-badge.png');
|
||||||
|
} else {
|
||||||
embed.setThumbnail(member.avatarURL);
|
embed.setThumbnail(member.avatarURL);
|
||||||
|
}
|
||||||
const ackResolve = this.resolveStaffInformation(member.id);
|
const ackResolve = this.resolveStaffInformation(member.id);
|
||||||
let description = '';
|
let description = '';
|
||||||
if (ackResolve?.title && ackResolve?.dept) {
|
if (ackResolve?.title && ackResolve?.dept) {
|
||||||
description += `<:loc:607695848612167700> __**${ackResolve.title}**__, ${ackResolve.dept}\n\n`;
|
description += `${emotes.titleAndDepartment} __**${ackResolve.title}**__, ${ackResolve.dept}\n\n`;
|
||||||
}
|
}
|
||||||
if (ackResolve?.emailAddress) {
|
if (ackResolve?.emailAddress) {
|
||||||
description += `<:email:699730553858949273> ${ackResolve.emailAddress}\n`;
|
description += `${emotes.email} ${ackResolve.emailAddress}\n`;
|
||||||
}
|
}
|
||||||
if (ackResolve?.gitlab) {
|
if (ackResolve?.gitlab) {
|
||||||
description += `<:gitlab:699729689220218932> ${ackResolve.gitlab}\n`;
|
description += `${emotes.gitlab} ${ackResolve.gitlab}\n`;
|
||||||
}
|
}
|
||||||
if (ackResolve?.github) {
|
if (ackResolve?.github) {
|
||||||
description += `<:github:699729719826055179> ${ackResolve.github}\n`;
|
description += `${emotes.github} ${ackResolve.github}\n`;
|
||||||
}
|
}
|
||||||
if (ackResolve?.bio) {
|
if (ackResolve?.bio) {
|
||||||
description += `<:bio:699731093179596854> *${ackResolve.bio}*\n`;
|
description += `${emotes.bio} *${ackResolve.bio}*\n`;
|
||||||
}
|
}
|
||||||
description += `\n<@${member.id}>`;
|
description += `\n<@${member.id}>`;
|
||||||
embed.setDescription(description);
|
embed.setDescription(description);
|
||||||
|
|
Loading…
Reference in New Issue