From 6a75b39c109d66c2a7ce276b487c8b609ee07a3f Mon Sep 17 00:00:00 2001
From: Caleb Fontenot <foley2431@gmail.com>
Date: Thu, 25 May 2023 21:26:30 -0500
Subject: [PATCH] add protections into command

---
 commands/removePhrase.cjs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/commands/removePhrase.cjs b/commands/removePhrase.cjs
index 7371717..764faa4 100644
--- a/commands/removePhrase.cjs
+++ b/commands/removePhrase.cjs
@@ -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 {