add protections into command

This commit is contained in:
Chloe Fontenot 🏳️‍⚧️ 2023-05-25 21:32:07 -05:00
parent aaca29ebcb
commit becd247715

View File

@ -16,9 +16,10 @@ module.exports = {
async execute(interaction) {
var abbreviation = interaction.options.getString('abbreviation').toLowerCase();
//var phrase = interaction.options.getString('phrase');
const user = interaction.options.user;
console.log("Command executed by " + interaction.member)
if (user.member.roles.cache.some(role => role.name == "Trusted Users")) {
//(user.member.roles.cache.some(role => role.name == "Trusted Users"))
if (interaction.member == "294976590658666497")
{
await interaction.reply('Removing abbreviation `' + abbreviation + "` from the target list...");
removePhrase(abbreviation);
} else {