You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Haha-Yes/commands/admin/prune.js

31 lines
947 B
JavaScript

6 years ago
const { Command } = require('discord.js-commando');
module.exports = class PruneCommand extends Command {
constructor(client) {
super(client, {
name: 'prune',
6 years ago
aliases: ['purge', 'clear', 'clean'],
group: 'admin',
6 years ago
memberName: 'prune',
description: 'Bulk delete messages.',
clientPermissions: ['READ_MESSAGE_HISTORY', 'MANAGE_MESSAGES'],
userPermissions: ['MANAGE_MESSAGES'],
guildOnly: true,
args: [
{
key: 'amount',
prompt: 'How many messages would you like to delete? ( choose a number between 1 & 99 )',
type: 'integer',
min: '1',
max: '99'
}
]
6 years ago
});
}
run(message, { amount }) {
amount = amount+1
message.channel.bulkDelete(amount, true);
}
};