Added back prune
This commit is contained in:
parent
16b820d196
commit
02ea23caab
1 changed files with 27 additions and 0 deletions
27
commands/admin/prune.js
Normal file
27
commands/admin/prune.js
Normal file
|
@ -0,0 +1,27 @@
|
|||
const { Command } = require('discord.js-commando');
|
||||
module.exports = class PruneCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'prune',
|
||||
group: 'fun',
|
||||
memberName: 'prune',
|
||||
description: 'Replies with a meow, kitty cat.',
|
||||
clientPermissions: ['MANAGE_MESSAGES'],
|
||||
userPermissions: ['MANAGE_MESSAGES'],
|
||||
args: [
|
||||
{
|
||||
key: 'amount',
|
||||
prompt: 'How many messages would you like to delete?',
|
||||
type: 'integer',
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
run(message, { amount }) {
|
||||
if (amount < 2 || amount > 100) {
|
||||
return message.reply('you need to input a number between 2 and 100.');
|
||||
}
|
||||
message.channel.bulkDelete(amount, true);
|
||||
}
|
||||
};
|
Loading…
Reference in a new issue