This commit is contained in:
Daniel Odendahl Jr
2017-06-01 08:44:02 +00:00
parent 7802bb49cb
commit 14f85f94bd
129 changed files with 1915 additions and 1720 deletions
+8 -5
View File
@@ -6,7 +6,7 @@ module.exports = class PruneCommand extends Command {
name: 'prune',
group: 'moderation',
memberName: 'prune',
description: 'Deletes a specified number of messages from the current channel, up to 99.',
description: 'Deletes messages from the current channel, up to 99.',
guildOnly: true,
throttling: {
usages: 1,
@@ -14,21 +14,24 @@ module.exports = class PruneCommand extends Command {
},
clientPermissions: ['READ_MESSAGE_HISTORY', 'MANAGE_MESSAGES'],
userPermissions: ['MANAGE_MESSAGES'],
allowStaff: true,
args: [
{
key: 'count',
label: 'amount of messages',
prompt: 'How many messages do you want to delete? Limit of up to 99.',
type: 'integer',
validate: count => {
if (count < 100 && count > 0) return true;
return 'Invalid Count. Count must be from 1-99.';
validate: (count) => {
if (count < 100 && count > 0) {
return true;
} else {
return 'Invalid Count. Count must be from 1-99.';
}
}
}
]
});
}
async run(msg, args) {
const { count } = args;
try {