From 2381c84d849c78db1d6c8eb9f9b46138281439c8 Mon Sep 17 00:00:00 2001 From: cherryl1k <102343489+cherryl1k@users.noreply.github.com> Date: Thu, 31 Jul 2025 14:47:21 -0500 Subject: [PATCH] fix: enable the banning nonserver users --- tux/cogs/moderation/ban.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tux/cogs/moderation/ban.py b/tux/cogs/moderation/ban.py index 5f0b2c2af..0ad15ea3c 100644 --- a/tux/cogs/moderation/ban.py +++ b/tux/cogs/moderation/ban.py @@ -21,7 +21,7 @@ def __init__(self, bot: Tux) -> None: async def ban( self, ctx: commands.Context[Tux], - member: discord.Member, + user: discord.User, *, flags: BanFlags, ) -> None: @@ -48,19 +48,19 @@ async def ban( assert ctx.guild # Check if moderator has permission to ban the member - if not await self.check_conditions(ctx, member, ctx.author, "ban"): + if not await self.check_conditions(ctx, user, ctx.author, "ban"): return # Execute ban with case creation and DM await self.execute_mod_action( ctx=ctx, case_type=CaseType.BAN, - user=member, + user=user, reason=flags.reason, silent=flags.silent, dm_action="banned", actions=[ - (ctx.guild.ban(member, reason=flags.reason, delete_message_seconds=flags.purge * 86400), type(None)), + (ctx.guild.ban(user, reason=flags.reason, delete_message_seconds=flags.purge * 86400), type(None)), ], )