From bdef73b646ce73b4284498ee3f39b4ab7b807c71 Mon Sep 17 00:00:00 2001 From: Matthew R Date: Wed, 29 Jul 2020 00:43:16 -0400 Subject: [PATCH] fix issues with all commands --- src/commands/whois.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/commands/whois.ts b/src/commands/whois.ts index 256c2fc..2bae2c2 100644 --- a/src/commands/whois.ts +++ b/src/commands/whois.ts @@ -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');