@@ -21,7 +21,7 @@ def __init__(self, bot: Tux) -> None:
21
21
async def ban (
22
22
self ,
23
23
ctx : commands .Context [Tux ],
24
- user : discord .User ,
24
+ member : discord . Member | discord .User ,
25
25
* ,
26
26
flags : BanFlags ,
27
27
) -> None :
@@ -32,7 +32,7 @@ async def ban(
32
32
----------
33
33
ctx : commands.Context[Tux]
34
34
The context in which the command is being invoked.
35
- member : discord.Member
35
+ member : discord.Member | discord.User
36
36
The member to ban.
37
37
flags : BanFlags
38
38
The flags for the command. (reason: str, purge: int (< 7), silent: bool)
@@ -48,19 +48,19 @@ async def ban(
48
48
assert ctx .guild
49
49
50
50
# 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" ):
52
52
return
53
53
54
54
# Execute ban with case creation and DM
55
55
await self .execute_mod_action (
56
56
ctx = ctx ,
57
57
case_type = CaseType .BAN ,
58
- user = user ,
58
+ user = member ,
59
59
reason = flags .reason ,
60
60
silent = flags .silent ,
61
61
dm_action = "banned" ,
62
62
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 )),
64
64
],
65
65
)
66
66
0 commit comments