aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/cogs/moderation/infractions.py4
-rw-r--r--bot/decorators.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/bot/cogs/moderation/infractions.py b/bot/cogs/moderation/infractions.py
index 8df642428..d720c2911 100644
--- a/bot/cogs/moderation/infractions.py
+++ b/bot/cogs/moderation/infractions.py
@@ -230,7 +230,7 @@ class Infractions(InfractionScheduler, commands.Cog):
await self.apply_infraction(ctx, infraction, user, action())
- @respect_role_hierarchy()
+ @respect_role_hierarchy(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`."""
infraction = await utils.post_infraction(ctx, user, "kick", reason, active=False, **kwargs)
@@ -245,7 +245,7 @@ class Infractions(InfractionScheduler, commands.Cog):
action = user.kick(reason=reason)
await self.apply_infraction(ctx, infraction, user, action)
- @respect_role_hierarchy()
+ @respect_role_hierarchy(2)
async def apply_ban(self, ctx: Context, user: UserSnowflake, reason: t.Optional[str], **kwargs) -> None:
"""
Apply a ban infraction with kwargs passed to `post_infraction`.
diff --git a/bot/decorators.py b/bot/decorators.py
index b4bf9ba05..6b2214f53 100644
--- a/bot/decorators.py
+++ b/bot/decorators.py
@@ -200,7 +200,7 @@ def redirect_output(destination_channel: int, bypass_roles: t.Container[int] = N
return wrap
-def respect_role_hierarchy(name_or_pos: Argument = 2) -> t.Callable:
+def respect_role_hierarchy(name_or_pos: Argument) -> t.Callable:
"""
Ensure the highest role of the invoking member is greater than that of the target member.