fix issue with member command

merge-requests/25/merge
Matthew 2021-04-21 15:28:49 -04:00
parent 4d84e21c75
commit 1e0716b409
No known key found for this signature in database
GPG Key ID: 210AF32ADE3B5C4B
1 changed files with 2 additions and 0 deletions

View File

@ -35,6 +35,8 @@ export default class Members extends Command {
const role = this.client.util.resolveRole(args.join(' '), this.mainGuild); const role = this.client.util.resolveRole(args.join(' '), this.mainGuild);
if (!role) return this.error(message.channel, 'The role you specified doesn\'t exist.'); if (!role) return this.error(message.channel, 'The role you specified doesn\'t exist.');
const check = this.mainGuild.members.filter((m) => m.roles.includes(role.id));
if (!check || check?.length < 1) return this.error(message.channel, 'There are no members in this role.');
const statusArray: string[] = []; const statusArray: string[] = [];
const membersOnline: string[] = []; const membersOnline: string[] = [];
const membersIdle: string[] = []; const membersIdle: string[] = [];