@@ -21,7 +21,7 @@ def __init__(self, bot: Tux) -> None:
2121 async def ban (
2222 self ,
2323 ctx : commands .Context [Tux ],
24- user : discord .User ,
24+ member : discord . Member | discord .User ,
2525 * ,
2626 flags : BanFlags ,
2727 ) -> None :
@@ -32,7 +32,7 @@ async def ban(
3232 ----------
3333 ctx : commands.Context[Tux]
3434 The context in which the command is being invoked.
35- member : discord.Member
35+ member : discord.Member | discord.User
3636 The member to ban.
3737 flags : BanFlags
3838 The flags for the command. (reason: str, purge: int (< 7), silent: bool)
@@ -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 , user , ctx .author , "ban" ):
51+ if not await self .check_conditions (ctx , member , 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 = user ,
58+ user = member ,
5959 reason = flags .reason ,
6060 silent = flags .silent ,
6161 dm_action = "banned" ,
6262 actions = [
63- (ctx .guild .ban (user , reason = flags .reason , delete_message_seconds = flags .purge * 86400 ), type (None )),
63+ (ctx .guild .ban (member , reason = flags .reason , delete_message_seconds = flags .purge * 86400 ), type (None )),
6464 ],
6565 )
6666
0 commit comments