Commit e6b0ddcd authored by Imran Hussain's avatar Imran Hussain
Browse files

Add a prune command - ++ useful for dev

parent 2eac74a8
Pipeline #640 passed with stages
in 21 minutes and 25 seconds
module.exports = {
name: 'prune',
description: 'Prune up to 99 messages.',
execute(message, args) {
const amount = parseInt(args[0]) + 1;
if (isNaN(amount)) {
return message.reply('that doesn\'t seem to be a valid number.');
} else if (amount <= 1 || amount > 100) {
return message.reply('you need to input a number between 1 and 99.');
}
message.channel.bulkDelete(amount, true).catch((err) => {
console.error(err);
message.channel.send('there was an error trying to prune messages in this channel!');
});
},
};
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment