@@ -130,7 +130,7 @@ async def format_not_found(self, ctx, command):
130130
131131 choices = set ()
132132
133- for name , c in self .bot .all_commands :
133+ for name , c in self .bot .all_commands . items () :
134134 if not c .hidden :
135135 choices .add (name )
136136
@@ -909,7 +909,7 @@ async def add_perms_command(self, ctx, command: str, *, user_or_role: Union[User
909909 elif user_or_role in {'everyone' , 'all' }:
910910 value = - 1
911911 else :
912- raise commands .UserInputError ( 'Invalid user or role .' )
912+ raise commands .BadArgument ( 'Could not find the specified User or Role .' )
913913
914914 await self .bot .update_perms (self .bot .all_commands [command ].name , value )
915915 embed = Embed (
@@ -937,7 +937,7 @@ async def add_perms_level(self, ctx, level: str, *, user_or_role: Union[User, Ro
937937 elif user_or_role in {'everyone' , 'all' }:
938938 value = - 1
939939 else :
940- raise commands .UserInputError ( 'Invalid user or role .' )
940+ raise commands .BadArgument ( 'Could not find the specified User or Role .' )
941941
942942 await self .bot .update_perms (PermissionLevel [level .upper ()], value )
943943 embed = Embed (
@@ -973,7 +973,7 @@ async def remove_perms_command(self, ctx, command: str, *, user_or_role: Union[U
973973 elif user_or_role in {'everyone' , 'all' }:
974974 value = - 1
975975 else :
976- raise commands .UserInputError ( 'Invalid user or role .' )
976+ raise commands .BadArgument ( 'Could not find the specified User or Role .' )
977977
978978 await self .bot .update_perms (self .bot .all_commands [command ].name , value , add = False )
979979 embed = Embed (
@@ -1001,7 +1001,7 @@ async def remove_perms_level(self, ctx, level: str, *, user_or_role: Union[User,
10011001 elif user_or_role in {'everyone' , 'all' }:
10021002 value = - 1
10031003 else :
1004- raise commands .UserInputError ( 'Invalid user or role .' )
1004+ raise commands .BadArgument ( 'Could not find the specified User or Role .' )
10051005
10061006 await self .bot .update_perms (PermissionLevel [level .upper ()], value , add = False )
10071007 embed = Embed (
@@ -1021,7 +1021,7 @@ async def get_perms(self, ctx, *, user_or_role: Union[User, Role, str]):
10211021 elif user_or_role in {'everyone' , 'all' }:
10221022 value = - 1
10231023 else :
1024- raise commands .UserInputError ( 'Invalid user or role .' )
1024+ raise commands .BadArgument ( 'Could not find the specified User or Role .' )
10251025
10261026 cmds = []
10271027 levels = []
0 commit comments