diff --git a/src/localization/en_gb/general/en_gb_moderation.lang b/src/localization/en_gb/general/en_gb_moderation.lang index ff56702..a9b9a9c 100644 --- a/src/localization/en_gb/general/en_gb_moderation.lang +++ b/src/localization/en_gb/general/en_gb_moderation.lang @@ -7,6 +7,9 @@ You can increase the amount of targets by upgrading to premium. [INFRACTION_ERROR] an error occured +[INFRACTION_PROTECTIONPOSITIONERROR_SAME] +they have the same role position as you + [INFRACTION_PROTECTIONPOSITIONERROR] they have hierarchy over you diff --git a/src/structure/interfaces/Infraction.js b/src/structure/interfaces/Infraction.js index 4d521b3..7dc4010 100644 --- a/src/structure/interfaces/Infraction.js +++ b/src/structure/interfaces/Infraction.js @@ -326,9 +326,10 @@ class Infraction { if (protection.type === 'position') { const executorHighest = executor.roles.highest; const targetHighest = target.roles.highest; - if (executorHighest.comparePositionTo(targetHighest) <= 0) { + if (executorHighest.comparePositionTo(targetHighest) === 0) + return this._fail('INFRACTION_PROTECTIONPOSITIONERROR_SAME'); + if (executorHighest.comparePositionTo(targetHighest) < 0) return this._fail('INFRACTION_PROTECTIONPOSITIONERROR'); - } } else if (protection.type === 'role') { const contains = target.roles.cache.some((r) => protection.roles.includes(r.id)); if (contains) {