fix flags in whois
parent
358bf2c9c2
commit
ee2038b26b
|
@ -35,25 +35,7 @@ export default class Whois extends Command {
|
||||||
if (ackResolve?.pn?.length > 0) title += `, ${ackResolve.pn.join(', ')}`;
|
if (ackResolve?.pn?.length > 0) title += `, ${ackResolve.pn.join(', ')}`;
|
||||||
embed.setAuthor(title, member.user.avatarURL);
|
embed.setAuthor(title, member.user.avatarURL);
|
||||||
|
|
||||||
const flags = [];
|
|
||||||
if (member.user.publicFlags) {
|
|
||||||
if (member.roles.includes('446104438969466890') || member.roles.includes('701481967149121627')) flags.push('<:loc:607695848612167700>');
|
|
||||||
if ((member.user.publicFlags & (1 << 12)) === 1 << 12) flags.push('<:System:768370601265201152>');
|
|
||||||
if ((member.user.publicFlags & (1 << 0)) === 1 << 0) flags.push('<:DiscordStaff:768370601882025985>');
|
|
||||||
if ((member.user.publicFlags & (1 << 1)) === 1 << 1) flags.push('<:Partnered:768370601395879936>');
|
|
||||||
if ((member.user.publicFlags & (1 << 3)) === 1 << 3) flags.push('<:BugHunter:768370601105555467>');
|
|
||||||
if ((member.user.publicFlags & (1 << 14)) === 1 << 14) flags.push('<:BugHunter:768370601105555467>');
|
|
||||||
if ((member.user.publicFlags & (1 << 2)) === 1 << 2) flags.push('<:HypeSquadEvents:768370600745762846>');
|
|
||||||
if ((member.user.publicFlags & (1 << 6)) === 1 << 6) flags.push('<:HypeSquadBravery:768370601328640011> ');
|
|
||||||
if ((member.user.publicFlags & (1 << 7)) === 1 << 7) flags.push('<:HypeSquadBrilliance:768370600842362900>');
|
|
||||||
if ((member.user.publicFlags & (1 << 8)) === 1 << 8) flags.push('<:HypeSquadBalance:768370599584071751> ');
|
|
||||||
if ((member.user.publicFlags & (1 << 9)) === 1 << 9) flags.push('<:EarlySupporter:768370601873768468>');
|
|
||||||
if ((member.user.publicFlags & (1 << 16)) === 1 << 16) flags.push('<:VerifiedBot:768370599252197396>');
|
|
||||||
if ((member.user.publicFlags & (1 << 17)) === 1 << 17) flags.push('<:VerifiedBotDeveloper:768370601701933077>');
|
|
||||||
}
|
|
||||||
|
|
||||||
let description = '';
|
let description = '';
|
||||||
if (flags.length > 0) description += `${flags.join(' ')}\n\n`;
|
|
||||||
let titleAndDepartment = '';
|
let titleAndDepartment = '';
|
||||||
if (ackResolve?.title && ackResolve?.dept) {
|
if (ackResolve?.title && ackResolve?.dept) {
|
||||||
titleAndDepartment += `${emotes.titleAndDepartment} __**${ackResolve.title}**__, __${ackResolve.dept}__\n\n`;
|
titleAndDepartment += `${emotes.titleAndDepartment} __**${ackResolve.title}**__, __${ackResolve.dept}__\n\n`;
|
||||||
|
@ -99,9 +81,28 @@ export default class Whois extends Command {
|
||||||
else totalScore = `${score.total}`;
|
else totalScore = `${score.total}`;
|
||||||
embed.addField('Community Score', totalScore, true);
|
embed.addField('Community Score', totalScore, true);
|
||||||
} else embed.addField('Community Score', 'N/C', true);
|
} else embed.addField('Community Score', 'N/C', true);
|
||||||
|
|
||||||
if (member.roles.length > 0) {
|
if (member.roles.length > 0) {
|
||||||
embed.addField(`Roles [${member.roles.length}]`, member.roles.map((r) => this.mainGuild.roles.get(r)).sort((a, b) => b.position - a.position).map((r) => `<@&${r.id}>`).join(', '));
|
embed.addField(`Roles [${member.roles.length}]`, member.roles.map((r) => this.mainGuild.roles.get(r)).sort((a, b) => b.position - a.position).map((r) => `<@&${r.id}>`).join(', '));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const flags = [];
|
||||||
|
if (member.user.publicFlags) {
|
||||||
|
if ((member.user.publicFlags & (1 << 12)) === 1 << 12) flags.push('<:System:768370601265201152>');
|
||||||
|
if ((member.user.publicFlags & (1 << 0)) === 1 << 0) flags.push('<:DiscordStaff:768370601882025985>');
|
||||||
|
if ((member.user.publicFlags & (1 << 1)) === 1 << 1) flags.push('<:Partnered:768370601395879936>');
|
||||||
|
if ((member.user.publicFlags & (1 << 3)) === 1 << 3) flags.push('<:BugHunter:768370601105555467>');
|
||||||
|
if ((member.user.publicFlags & (1 << 14)) === 1 << 14) flags.push('<:BugHunter:768370601105555467>');
|
||||||
|
if ((member.user.publicFlags & (1 << 2)) === 1 << 2) flags.push('<:HypeSquadEvents:768370600745762846>');
|
||||||
|
if ((member.user.publicFlags & (1 << 6)) === 1 << 6) flags.push('<:HypeSquadBravery:768370601328640011> ');
|
||||||
|
if ((member.user.publicFlags & (1 << 7)) === 1 << 7) flags.push('<:HypeSquadBrilliance:768370600842362900>');
|
||||||
|
if ((member.user.publicFlags & (1 << 8)) === 1 << 8) flags.push('<:HypeSquadBalance:768370599584071751> ');
|
||||||
|
if ((member.user.publicFlags & (1 << 9)) === 1 << 9) flags.push('<:EarlySupporter:768370601873768468>');
|
||||||
|
if ((member.user.publicFlags & (1 << 16)) === 1 << 16) flags.push('<:VerifiedBot:768370599252197396>');
|
||||||
|
if ((member.user.publicFlags & (1 << 17)) === 1 << 17) flags.push('<:VerifiedBotDeveloper:768370601701933077>');
|
||||||
|
}
|
||||||
|
if (flags.length > 0) embed.addField('Flags', flags.join(' '));
|
||||||
|
|
||||||
const permissions: string[] = [];
|
const permissions: string[] = [];
|
||||||
const serverAcknowledgements: string[] = [];
|
const serverAcknowledgements: string[] = [];
|
||||||
const bit = member.permission.allow;
|
const bit = member.permission.allow;
|
||||||
|
|
Loading…
Reference in New Issue