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
841 B
JavaScript

const { Command } = require('discord-akairo');
5 years ago
class PruneCommand extends Command {
constructor() {
super('Prune', {
5 years ago
aliases: ['Prune', 'clean', 'purge'],
category: 'admin',
args: [
{
id: "amount",
type: "integer"
}
],
clientPermissions: ['MANAGE_MESSAGES'],
userPermissions: ['MANAGE_MESSAGES'],
channelRestriction: 'guild',
description: {
content: 'Bulk delete messages',
usage: '[amount]',
examples: ['50']
}
6 years ago
});
}
async exec(message,args) {
5 years ago
if (args.amount >= 100) return;
message.channel.bulkDelete(args.amount + 1, true);
}
}
module.exports = PruneCommand;