add protections into command
This commit is contained in:
parent
b1bb9c3845
commit
fe0c2d23bd
@ -16,8 +16,13 @@ module.exports = {
|
|||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
var abbreviation = interaction.options.getString('abbreviation').toLowerCase();
|
var abbreviation = interaction.options.getString('abbreviation').toLowerCase();
|
||||||
//var phrase = interaction.options.getString('phrase');
|
//var phrase = interaction.options.getString('phrase');
|
||||||
await interaction.reply('Removing abbreviation `' + abbreviation + "` from the target list...");
|
if (message.member.roles.cache.some(role => role.name == "Trusted Users")) {
|
||||||
removePhrase(abbreviation);
|
await interaction.reply('Removing abbreviation `' + abbreviation + "` from the target list...");
|
||||||
|
removePhrase(abbreviation);
|
||||||
|
} else {
|
||||||
|
await interaction.reply('Sorry, but you are not authorized to run this command...');
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user