diff --git a/src/commands/members.ts b/src/commands/members.ts index 678ca09..4d57c59 100644 --- a/src/commands/members.ts +++ b/src/commands/members.ts @@ -35,6 +35,8 @@ export default class Members extends Command { const role = this.client.util.resolveRole(args.join(' '), this.mainGuild); 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 membersOnline: string[] = []; const membersIdle: string[] = [];