aboutsummaryrefslogtreecommitdiff
path: root/src/commands/admin/channelPermissions.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-10-21 00:05:53 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-10-21 00:05:53 -0400
commit166d7fdf24440db71311c2cda95697c06e7b8b36 (patch)
tree23b0400362b5f3035b156200eb634d202aa54741 /src/commands/admin/channelPermissions.ts
parent08f33f7d450c8920afc3b9fb8886729547065313 (diff)
downloadtanzanite-166d7fdf24440db71311c2cda95697c06e7b8b36.tar.gz
tanzanite-166d7fdf24440db71311c2cda95697c06e7b8b36.tar.bz2
tanzanite-166d7fdf24440db71311c2cda95697c06e7b8b36.zip
Refactoring, rewrote ButtonPaginator, better permission handling + support for send messages in threads, optimizations, another scam link
Diffstat (limited to 'src/commands/admin/channelPermissions.ts')
-rw-r--r--src/commands/admin/channelPermissions.ts7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/commands/admin/channelPermissions.ts b/src/commands/admin/channelPermissions.ts
index f313a8f..f8c97a9 100644
--- a/src/commands/admin/channelPermissions.ts
+++ b/src/commands/admin/channelPermissions.ts
@@ -1,5 +1,6 @@
import { GuildMember, MessageEmbed, Role } from 'discord.js';
import { BushCommand, BushMessage } from '../../lib';
+import { ButtonPaginator } from '../../lib/common/ButtonPaginator';
export default class ChannelPermissionsCommand extends BushCommand {
public constructor() {
@@ -42,9 +43,7 @@ export default class ChannelPermissionsCommand extends BushCommand {
}
}
],
- ratelimit: 4,
- cooldown: 4000,
- clientPermissions: ['MANAGE_CHANNELS', 'SEND_MESSAGES'],
+ clientPermissions: (m) => util.clientSendAndPermCheck(m, ['MANAGE_CHANNELS']),
userPermissions: ['ADMINISTRATOR'],
channel: 'guild'
});
@@ -85,7 +84,7 @@ export default class ChannelPermissionsCommand extends BushCommand {
paginate.push(new MessageEmbed().setDescription(failure.substring(i, Math.min(failure.length, i + 4000))));
}
const normalMessage = `Finished changing perms! Failed channels:`;
- return await client.util.buttonPaginate(message, paginate, normalMessage);
+ return await ButtonPaginator.send(message, paginate, normalMessage);
} else {
return await message.util.reply({
content: `Finished changing perms! Failed channels:`,