add protections into command
This commit is contained in:
parent
aaca29ebcb
commit
becd247715
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user