2022-01-04 02:18:28 +05:00
|
|
|
const Command = require("../../base/Command.js");
|
|
|
|
|
|
|
|
class Deletemod extends Command {
|
|
|
|
constructor(client) {
|
|
|
|
super(client, {
|
|
|
|
name: "deletemod",
|
|
|
|
dirname: __dirname,
|
|
|
|
enabled: true,
|
|
|
|
guildOnly: true,
|
|
|
|
aliases: ["delm"],
|
|
|
|
memberPermissions: ["MANAGE_MESSAGES"],
|
|
|
|
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS"],
|
|
|
|
nsfw: false,
|
|
|
|
ownerOnly: false,
|
|
|
|
cooldown: 1000
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
async run(message, args, data) {
|
|
|
|
const status = args[0];
|
|
|
|
if (!status || status !== "on" && status !== "off") return message.error("administration/deletemod:MISSING_STATUS");
|
|
|
|
|
|
|
|
if (status === "on") {
|
|
|
|
data.guild.autoDeleteModCommands = true;
|
|
|
|
data.guild.save();
|
|
|
|
message.success("administration/deletemod:ENABLED");
|
|
|
|
} else {
|
|
|
|
data.guild.autoDeleteModCommands = false;
|
|
|
|
data.guild.save();
|
|
|
|
message.success("administration/deletemod:DISABLED");
|
2022-01-13 00:26:23 +05:00
|
|
|
}
|
2022-01-04 02:18:28 +05:00
|
|
|
}
|
2022-01-13 00:26:23 +05:00
|
|
|
}
|
2022-01-04 02:18:28 +05:00
|
|
|
|
|
|
|
module.exports = Deletemod;
|