Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- client.on('message', msg => {
- if (msg.author.bot) return;
- if (!msg.content.startsWith(prefix)) return;
- let command = msg.content.split(" ")[0];
- command = command.slice(prefix.length);
- let args = msg.content.split(" ").slice(1);
- if(command === "clear") {
- const emoji = client.emojis.find("name", "wastebasket")
- let textxt = args.slice(0).join("");
- if(msg.member.hasPermission("MANAGE_MESSAGES")) {
- if (textxt == " ") {
- msg.delete().then
- msg.channel.bulkDelete(1000).then(m => m.delete(3000));
- } else {
- msg.delete().then
- msg.delete().then
- msg.channel.bulkDelete(textxt);
- msg.channel.send(`\`عدد الرسائل التي تم مسحها: ${textxt}\``).then(m => m.delete(3000));
- }
- }
- }
- });
Add Comment
Please, Sign In to add comment