diff --git a/structure/client/components/settings/administration/Protection.js b/structure/client/components/settings/administration/Protection.js index c98645b..4e63a1b 100644 --- a/structure/client/components/settings/administration/Protection.js +++ b/structure/client/components/settings/administration/Protection.js @@ -8,6 +8,9 @@ class ProtectionSetting extends Setting { name: 'protection', module: 'administration', usage: "<'type'|'add'|'remove'> <'role'|'position'|role..>", + aliases: [ + 'protectiontype' + ], examples: [ 'protection type ', 'protection add ', @@ -36,15 +39,16 @@ class ProtectionSetting extends Setting { const langParams = {}; - if (method === 'type') { + if (method === 'type' || message._caller === 'protectiontype') { if (!params[1]) return { error: true, msg: message.format('MISSING_ARGS') }; - const value = params[1].toLowerCase(); - if (!['role', 'position'].includes(value)) return { error: true, msg: message.format('S_PROTECTION_INVALID_ARGS') }; + let value = params[1].toLowerCase(); + if (!['role', 'roles', 'position'].includes(value)) return { error: true, msg: message.format('S_PROTECTION_INVALID_ARGS') }; + if (value === 'roles') value = 'role'; setting.type = value; index = 'S_PROTECTION_TYPE';