discord.js clear code

JavaScript
case 'clear':
            if(!args[1]) return message.reply ('Error, please define second argument')
            message.channel.bulkDelete(args[1]); //please note that you need other code that i posted 
Source

Also in JavaScript: