Merge branch 'dev'
commit
326b88c19d
|
@ -58,7 +58,7 @@ export default class Whois extends Command {
|
|||
description += `\n<@${member.id}>`;
|
||||
embed.setDescription(description);
|
||||
|
||||
for (const role of member.roles.map((r) => message.guild.roles.get(r)).sort((a, b) => b.position - a.position)) {
|
||||
for (const role of member.roles.map((r) => this.mainGuild.roles.get(r)).sort((a, b) => b.position - a.position)) {
|
||||
if (role?.color !== 0) {
|
||||
embed.setColor(role.color);
|
||||
break;
|
||||
|
@ -70,12 +70,12 @@ export default class Whois extends Command {
|
|||
embed.addField('Joined At', `${moment(new Date(member.joinedAt)).format('dddd, MMMM Do YYYY, h:mm:ss A')} ET`, true);
|
||||
embed.addField('Created At', `${moment(new Date(member.user.createdAt)).format('dddd, MMMM Do YYYY, h:mm:ss A')} ET`, true);
|
||||
if (member.roles.length > 0) {
|
||||
embed.addField(`Roles [${member.roles.length}]`, member.roles.map((r) => message.guild.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 permissions: string[] = [];
|
||||
const serverAcknowledgements: string[] = [];
|
||||
const bit = member.permission.allow;
|
||||
if (message.guild.ownerID === member.id) serverAcknowledgements.push('Server Owner');
|
||||
if (this.mainGuild.ownerID === member.id) serverAcknowledgements.push('Server Owner');
|
||||
if (bit & 8) { permissions.push('Administrator'); serverAcknowledgements.push('Server Admin'); }
|
||||
if (bit & 32) { permissions.push('Manage Server'); serverAcknowledgements.push('Server Manager'); }
|
||||
if (bit & 16) permissions.push('Manage Channels');
|
||||
|
|
Loading…
Reference in New Issue