diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-09-01 22:19:41 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-09-01 22:19:41 -0400 |
commit | 560ed31860a420dcc43571d2e12dd2f51bcee7a8 (patch) | |
tree | 855e0cb50c550bbff63ab675e1102b7608573668 /src/commands/admin/roleAll.ts | |
parent | 855aa36c46e250fd3063eb200d784903a8c388d3 (diff) | |
download | tanzanite-560ed31860a420dcc43571d2e12dd2f51bcee7a8.tar.gz tanzanite-560ed31860a420dcc43571d2e12dd2f51bcee7a8.tar.bz2 tanzanite-560ed31860a420dcc43571d2e12dd2f51bcee7a8.zip |
cleanup
Diffstat (limited to 'src/commands/admin/roleAll.ts')
-rw-r--r-- | src/commands/admin/roleAll.ts | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/commands/admin/roleAll.ts b/src/commands/admin/roleAll.ts index 2382a4b..7e60f40 100644 --- a/src/commands/admin/roleAll.ts +++ b/src/commands/admin/roleAll.ts @@ -5,7 +5,7 @@ export default class RoleAllCommand extends BushCommand { public constructor() { super('roleAll', { aliases: ['roleall', 'rall'], - category: 'Server Admin', + category: 'admin', description: { content: 'Give a role to every member on the server.', usage: 'roleAll <role> [another role]... [--bots]', @@ -45,11 +45,8 @@ export default class RoleAllCommand extends BushCommand { ); } - console.time('roleAll1'); let members = await message.guild.members.fetch(); - console.timeEnd('roleAll1'); - console.time('roleAll2'); members = members.filter((member: GuildMember) => { try { if (member.user.bot && !args.bot) return false; @@ -59,21 +56,15 @@ export default class RoleAllCommand extends BushCommand { } return true; }); - console.timeEnd('roleAll2'); - console.time('roleAll3'); await message.util.reply(`${this.client.util.emojis.loading} adding roles to ${members.size} members`); console.timeEnd('roleAll3'); - console.time('roleAll4'); const promises = members.map((member: GuildMember) => { return member.roles.add(args.role, `RoleAll Command - triggered by ${message.author.tag} (${message.author.id})`); }); - console.timeEnd('roleAll4'); - console.time('roleAll5'); const failed = (await Promise.allSettled(promises)).filter((val) => val.status === 'rejected'); - console.timeEnd('roleAll5'); if (!failed.length) { await message.util.reply({ |