@@ -1524,8 +1524,10 @@ def add_command_recursive(cmd):
15241524 return await ctx .send (f"Invalid permission level: `{ level_name } `. Aborting." )
15251525
15261526 # Confirmation
1527- command_list_str = ", " .join (f"`{ c .qualified_name } `" for c in sorted (final_commands , key = lambda x : x .qualified_name ))
1528-
1527+ command_list_str = ", " .join (
1528+ f"`{ c .qualified_name } `" for c in sorted (final_commands , key = lambda x : x .qualified_name )
1529+ )
1530+
15291531 # Truncate if too long for embed description
15301532 if len (command_list_str ) > 2000 :
15311533 command_list_str = command_list_str [:1997 ] + "..."
@@ -1541,7 +1543,9 @@ def add_command_recursive(cmd):
15411543 try :
15421544 msg = await self .bot .wait_for (
15431545 "message" ,
1544- check = lambda m : m .author == ctx .author and m .channel == ctx .channel and m .content .lower () in ("confirm" , "cancel" ),
1546+ check = lambda m : m .author == ctx .author
1547+ and m .channel == ctx .channel
1548+ and m .content .lower () in ("confirm" , "cancel" ),
15451549 timeout = 30.0 ,
15461550 )
15471551 except asyncio .TimeoutError :
@@ -1555,9 +1559,9 @@ def add_command_recursive(cmd):
15551559 for cmd in final_commands :
15561560 self .bot .config ["override_command_level" ][cmd .qualified_name ] = level .name
15571561 count += 1
1558-
1562+
15591563 await self .bot .config .update ()
1560-
1564+
15611565 await ctx .send (f"Successfully updated permissions for { count } commands." )
15621566
15631567 @permissions .command (name = "add" , usage = "[command/level] [name] [user/role]" )
0 commit comments