add protections into command

master
Caleb Fontenot 2023-05-25 21:26:30 +07:00
parent fe0c2d23bd
commit 6a75b39c10
1 changed files with 2 additions and 1 deletions

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