add protections into command

master
Caleb Fontenot 2023-05-25 21:32:07 +07:00
parent aaca29ebcb
commit becd247715
1 changed files with 3 additions and 2 deletions

@ -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 {