This commit is contained in:
Erik 2020-07-28 13:50:41 +03:00
parent 627a9615aa
commit 91a8b135e3

View File

@ -225,7 +225,7 @@ class Infraction {
if (this.guild && this.guild._settings.protection.enabled) { if (this.guild && this.guild._settings.protection.enabled) {
//Idk what the thought process here has been, but the user object does not have roles, and the executor is a user object //Idk what the thought process here has been, but the user object does not have roles, and the executor is a user object
const executorHighest = this.guild.members.cache.get(this.executor.id).roles.highest; //this.executor.roles.highest; const executorHighest = this.guild.members.cache.get(this.executor.id).roles.highest; //this.executor.roles.highest;
const targetHighest = this.member.roles.highest; const targetHighest = this.guild.members.cache.get(this.target.id).roles.highest; //this.member.roles.highest;
if(executorHighest.comparePositionTo(targetHighest) > 0) { if(executorHighest.comparePositionTo(targetHighest) > 0) {
return this._fail('INFRACTION_PROTECTIONERROR'); return this._fail('INFRACTION_PROTECTIONERROR');
} }