nyx/commands/Owner/blacklist.js
2021-09-06 18:38:25 +08:00

26 lines
747 B
JavaScript

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);
message.reply(
`**Blacklisted** ${message.guild.members.cache.get(
user
)}.\n**Reason: **${reason}`
);
} else {
await client.data.BK(user, toggle, reason);
message.reply(
`Removed blacklist from ${message.guild.members.cache.get(user)}`
);
}
},
};