Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const { RichEmbed } = require("discord.js");
- module.exports = {
- name: "clear",
- category: "moderation",
- description: "Clears amount of messages",
- usage: "<amount>",
- run: async(client, message, args) => {
- if(isNaN(args[0])) return message.channel.send("Please input a valid number!");
- if(args[0] > 101) return message.channel.send("I can only delete max 100 messages at a time!");
- message.channel.bulkDelete(args[0]).then(messages => message.channel.send(`**Successfuly deleted ${messages.size} of ${args[0]}**`));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement