diff options
Diffstat (limited to 'bot/exts/moderation/infraction/infractions.py')
-rw-r--r-- | bot/exts/moderation/infraction/infractions.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bot/exts/moderation/infraction/infractions.py b/bot/exts/moderation/infraction/infractions.py index 4afa66460..93a6b6c8b 100644 --- a/bot/exts/moderation/infraction/infractions.py +++ b/bot/exts/moderation/infraction/infractions.py @@ -314,8 +314,8 @@ class Infractions(InfractionScheduler, commands.Cog): @respect_role_hierarchy(member_arg=2) async def apply_kick(self, ctx: Context, user: Member, reason: t.Optional[str], **kwargs) -> None: """Apply a kick infraction with kwargs passed to `post_infraction`.""" - if user.top_role > ctx.me.top_role: - await ctx.send(":x: I can't kick users above me in the role hierarchy.") + if user.top_role >= ctx.me.top_role: + await ctx.send(":x: I can't kick users above or equal to me in the role hierarchy.") return infraction = await _utils.post_infraction(ctx, user, "kick", reason, active=False, **kwargs) @@ -344,8 +344,8 @@ class Infractions(InfractionScheduler, commands.Cog): Will also remove the banned user from the Big Brother watch list if applicable. """ - if hasattr(user, 'top_role') and user.top_role > ctx.me.top_role: - await ctx.send(":x: I can't ban users above me in the role hierarchy.") + if hasattr(user, 'top_role') and user.top_role >= ctx.me.top_role: + await ctx.send(":x: I can't ban users above or equal to me in the role hierarchy.") return # In the case of a permanent ban, we don't need get_active_infractions to tell us if one is active |