File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -1012,6 +1012,8 @@ async def block(
1012
1012
1013
1013
mention = getattr (user , "mention" , f"`{ user .id } `" )
1014
1014
1015
+ moderator = ctx .author .name
1016
+
1015
1017
if str (user .id ) in self .bot .blocked_whitelisted_users :
1016
1018
embed = discord .Embed (
1017
1019
title = "Error" ,
@@ -1021,18 +1023,18 @@ async def block(
1021
1023
return await ctx .send (embed = embed )
1022
1024
1023
1025
if after is not None :
1024
- reason = after .arg
1026
+ reason = f" { after .arg } by { moderator } "
1025
1027
if reason .startswith ("System Message: " ):
1026
1028
raise commands .BadArgument (
1027
1029
"The reason cannot start with `System Message:`."
1028
1030
)
1029
1031
if "%" in reason :
1030
1032
raise commands .BadArgument ('The reason contains illegal character "%".' )
1031
1033
if after .dt > after .now :
1032
- reason = f"{ reason } %{ after .dt .isoformat ()} %"
1034
+ reason = f"{ reason } %{ after .dt .isoformat ()} % by { moderator } "
1033
1035
1034
1036
if not reason :
1035
- reason = None
1037
+ reason = f"Blocked by { moderator } "
1036
1038
1037
1039
extend = f" for `{ reason } `" if reason is not None else ""
1038
1040
msg = self .bot .blocked_users .get (str (user .id ))
@@ -1046,7 +1048,7 @@ async def block(
1046
1048
):
1047
1049
if str (user .id ) in self .bot .blocked_users :
1048
1050
1049
- old_reason = msg .strip ().rstrip ("." ) or "no reason "
1051
+ old_reason = msg .strip ().rstrip ("." ) or f"Blocked by { moderator } "
1050
1052
embed = discord .Embed (
1051
1053
title = "Success" ,
1052
1054
description = f"{ mention } was previously blocked for "
You can’t perform that action at this time.
0 commit comments