1var amount = parseInt(args[0])
2
3 if (!amount) return message.channel.send("Please specify the amount of messages you want me to delete")
4 if (amount > 100 || amount < 1) return message.channel.send("Please select a number *between* 100 and 1")
5
6 message.channel.bulkDelete(amount).catch(err => {
7 message.channel.send(':x: Due to Discord Limitations, I cannot delete messages older than 14 days') })
8
9 let msg = await message.channel.send(`Deleted \`${amount}\` messages`)
10 setTimeout(() => {
11 msg.delete()
12 }, 2000)
1case 'clear':
2 if(!args[1]) return message.reply ('Error, please define second argument')
3 message.channel.bulkDelete(args[1]);