Merge branch 'dev'

pull/29/head
Matthew 2020-07-29 00:43:45 -04:00
commit 326b88c19d
No known key found for this signature in database
GPG Key ID: 210AF32ADE3B5C4B
1 changed files with 3 additions and 3 deletions

View File

@ -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');