blacklist.js (2124B)
1 module.exports = { 2 name: "blacklist", 3 category: "Owner", 4 usage: "(User) (Toggle) (Reason)", 5 description: "Manage Blacklisted Users", 6 Owner: true, 7 options: [ 8 { 9 type: 6, 10 name: "user", 11 description: "The user to blacklist/whitelist", 12 required: true, 13 }, 14 { 15 type: 5, 16 name: "blacklist", 17 description: "Whether to blacklist or whitelist", 18 required: true, 19 }, 20 { 21 type: 3, 22 name: "reason", 23 description: "The reason to blacklist", 24 required: true, 25 }, 26 ], 27 run: async (client, interaction) => { 28 const user = interaction.options.getUser("user"); 29 const toggle = interaction.options.getBoolean("blacklist"); 30 const reason = interaction.options.getString("reason"); 31 if (toggle === true) { 32 await client.data.BK(user.id, toggle, reason); 33 const embed = new EmbedBuilder() 34 .setTitle( 35 "<a:nyx_checkmark:897240322411724841> Successfully Blacklisted" 36 ) 37 .setDescription( 38 `**User:** ${user.user.tag} \`(${user.id})\`\n**Reason:** ${reason} \n**Blacklisted by:** ${interaction.member}` 39 ) 40 .setURL(client.web) 41 .setColor(client.color) 42 .setFooter({ 43 text: `Made by ${client.author}`, 44 iconURL: client.user.displayAvatarURL({ dynamic: true }), 45 }) 46 .setTimestamp(); 47 interaction.followUp({ embeds: [embed] }); 48 } else { 49 await client.data.BK(user.id, toggle, reason); 50 const embed = new EmbedBuilder() 51 .setTitle("<a:nyx_checkmark:897240322411724841> Removed From Blacklist") 52 .setDescription( 53 `**User:** ${user.user.tag} \`(${user.id})\`\n**Reason:** ${reason} \n**Whitelisted by:** ${interaction.member}` 54 ) 55 .setURL(client.web) 56 .setColor(client.color) 57 .setFooter({ 58 text: `Made by ${client.author}`, 59 iconURL: client.user.displayAvatarURL({ dynamic: true }), 60 }) 61 .setTimestamp(); 62 interaction.followUp({ embeds: [embed] }); 63 } 64 }, 65 };