Skip to content

Commit 2381c84

Browse files
committed
fix: enable the banning nonserver users
1 parent 784e178 commit 2381c84

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tux/cogs/moderation/ban.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def __init__(self, bot: Tux) -> None:
2121
async def ban(
2222
self,
2323
ctx: commands.Context[Tux],
24-
member: discord.Member,
24+
user: discord.User,
2525
*,
2626
flags: BanFlags,
2727
) -> None:
@@ -48,19 +48,19 @@ async def ban(
4848
assert ctx.guild
4949

5050
# Check if moderator has permission to ban the member
51-
if not await self.check_conditions(ctx, member, ctx.author, "ban"):
51+
if not await self.check_conditions(ctx, user, ctx.author, "ban"):
5252
return
5353

5454
# Execute ban with case creation and DM
5555
await self.execute_mod_action(
5656
ctx=ctx,
5757
case_type=CaseType.BAN,
58-
user=member,
58+
user=user,
5959
reason=flags.reason,
6060
silent=flags.silent,
6161
dm_action="banned",
6262
actions=[
63-
(ctx.guild.ban(member, reason=flags.reason, delete_message_seconds=flags.purge * 86400), type(None)),
63+
(ctx.guild.ban(user, reason=flags.reason, delete_message_seconds=flags.purge * 86400), type(None)),
6464
],
6565
)
6666

0 commit comments

Comments
 (0)