add protections into command

This commit is contained in:
Chloe Fontenot 🏳️‍⚧️ 2023-05-25 21:30:08 -05:00
parent 6a75b39c10
commit aaca29ebcb

View File

@ -17,6 +17,7 @@ module.exports = {
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")) {
await interaction.reply('Removing abbreviation `' + abbreviation + "` from the target list...");
removePhrase(abbreviation);