Haha-Yes/commands/admin/prune.js

33 lines
1,004 B
JavaScript
Raw Permalink Normal View History

2018-09-07 23:57:33 +02:00
const { Command } = require('discord.js-commando');
2018-12-25 19:17:07 +01:00
const blacklist = require('../../json/blacklist.json');
2018-09-07 23:57:33 +02:00
module.exports = class PruneCommand extends Command {
constructor(client) {
super(client, {
name: 'prune',
2018-09-21 14:03:01 +02:00
aliases: ['purge', 'clear', 'clean'],
2018-09-08 16:13:47 +02:00
group: 'admin',
2018-09-07 23:57:33 +02:00
memberName: 'prune',
2018-09-08 16:13:47 +02:00
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'
}
]
2018-09-07 23:57:33 +02:00
});
}
run(message, { amount }) {
amount = amount+1
message.channel.bulkDelete(amount, true);
}
};
2018-09-09 21:40:45 +02:00