2021-06-12 12:53:51 +02:00
|
|
|
const { Client, Message, MessageEmbed } = require("discord.js");
|
|
|
|
module.exports = {
|
|
|
|
name: "bk",
|
|
|
|
category: "Owner",
|
|
|
|
usage: "(User) (Toggle) (Reason)",
|
|
|
|
description: "Blacklist someone from the bot",
|
|
|
|
Owner: true,
|
|
|
|
run: async (client, message, args) => {
|
|
|
|
let user = args[0];
|
|
|
|
toggle = args[1];
|
|
|
|
reason = args.slice(2).join(" ");
|
|
|
|
if (toggle === "true") {
|
|
|
|
await client.data.BK(user, toggle, reason);
|
2021-09-06 12:38:25 +02:00
|
|
|
message.reply(
|
2021-06-12 12:53:51 +02:00
|
|
|
`**Blacklisted** ${message.guild.members.cache.get(
|
|
|
|
user
|
|
|
|
)}.\n**Reason: **${reason}`
|
|
|
|
);
|
|
|
|
} else {
|
|
|
|
await client.data.BK(user, toggle, reason);
|
2021-09-06 12:38:25 +02:00
|
|
|
message.reply(
|
2021-06-12 12:53:51 +02:00
|
|
|
`Removed blacklist from ${message.guild.members.cache.get(user)}`
|
|
|
|
);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
};
|