discord_bot/commands/moderation/nuke.js

24 lines
811 B
JavaScript

const Discord = require("discord.js");
module.exports = {
name: "nuke",
aliases: ["nuke", "nukes"],
category: "moderation",
description: "nuke",
run: async (client, message, args) => {
if(!message.guild.me.hasPermission("MANAGE_CHANNELS")) return message.channel.send('Ich habe nicht die richtigen Berechtigungen.')
if (!message.member.hasPermission("MANAGE_CHANNELS")) {
return message.channel.send("Sie haben keine Berechtigung!")
}
message.channel.clone().then
((ch) => {
ch.setParent(message.channel.parent);
ch.setPosition(message.channel.position);
message.channel.delete().then(() => {
ch.send("**Kanal wurde atomisiert** \n https://imgur.com/LIyGeCR")
})
});
}
}