2021-12-10 21:39:54 +05:00
|
|
|
const Command = require("../../base/Command.js");
|
|
|
|
|
|
|
|
class Deletemod extends Command {
|
2021-12-26 19:29:37 +05:00
|
|
|
constructor(client) {
|
2021-12-10 21:39:54 +05:00
|
|
|
super(client, {
|
|
|
|
name: "deletemod",
|
|
|
|
dirname: __dirname,
|
|
|
|
enabled: true,
|
|
|
|
guildOnly: true,
|
2022-01-01 00:50:09 +05:00
|
|
|
aliases: ["delm"],
|
2021-12-26 19:29:37 +05:00
|
|
|
memberPermissions: ["MANAGE_MESSAGES"],
|
|
|
|
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS"],
|
2021-12-10 21:39:54 +05:00
|
|
|
nsfw: false,
|
|
|
|
ownerOnly: false,
|
2022-01-01 00:50:09 +05:00
|
|
|
cooldown: 1000
|
2021-12-10 21:39:54 +05:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2021-12-26 19:29:37 +05:00
|
|
|
async run(message, args, data) {
|
2021-12-10 21:39:54 +05:00
|
|
|
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");
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = Deletemod;
|