diff --git a/commands/purge.js b/commands/purge.js index ce5b2f06..a5370e2e 100644 --- a/commands/purge.js +++ b/commands/purge.js @@ -12,6 +12,10 @@ module.exports = { async execute(interaction) { const deleteCount = interaction.options.get('num').value; + if (!interaction.member.permissions.has('MANAGE_MESSAGES')) { + return interaction.reply("I can't purge these messages."); + } + if (!deleteCount || deleteCount < 2 || deleteCount > 100) { return void interaction.reply({ content: `Please provide a number between 2 and 100 for the number of messages to delete`,