aboutsummaryrefslogtreecommitdiff
path: root/src/commands/admin
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/admin')
-rw-r--r--src/commands/admin/channelPermissions.ts2
-rw-r--r--src/commands/admin/roleAll.ts11
2 files changed, 2 insertions, 11 deletions
diff --git a/src/commands/admin/channelPermissions.ts b/src/commands/admin/channelPermissions.ts
index ea97343..3b8c157 100644
--- a/src/commands/admin/channelPermissions.ts
+++ b/src/commands/admin/channelPermissions.ts
@@ -71,7 +71,7 @@ export default class ChannelPermissionsCommand extends BushCommand {
await channel.permissionOverwrites.create(
target.id,
{ [permission]: permissionState },
- { reason: 'Changing overwrites for mass channel channel perms command' }
+ { reason: 'Changing overwrites for mass channel perms command' }
);
} catch (e) {
client.console.debug(e.stack);
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({