Repository: Cog-Creators/Red-DiscordBot

Issue:
[Core] Converters in whitelist/blacklist commands are failing
Whitelist add errors out with 

Converting to "_GenericAlias" failed for parameter "users".


Discussion:

Resolving patch:
diff --git a/redbot/core/core_commands.py b/redbot/core/core_commands.py
--- a/redbot/core/core_commands.py
+++ b/redbot/core/core_commands.py
@@ -1718,7 +1718,7 @@ async def whitelist(self, ctx: commands.Context):
         pass
 
     @whitelist.command(name="add")
-    async def whitelist_add(self, ctx: commands.Context, *users: List[Union[discord.Member, int]]):
+    async def whitelist_add(self, ctx: commands.Context, *users: Union[discord.Member, int]):
         """
         Adds a user to the whitelist.
         """
@@ -1746,9 +1746,7 @@ async def whitelist_list(self, ctx: commands.Context):
             await ctx.send(box(page))
 
     @whitelist.command(name="remove")
-    async def whitelist_remove(
-        self, ctx: commands.Context, *users: List[Union[discord.Member, int]]
-    ):
+    async def whitelist_remove(self, ctx: commands.Context, *users: Union[discord.Member, int]):
         """
         Removes user from whitelist.
         """
@@ -1774,7 +1772,7 @@ async def blacklist(self, ctx: commands.Context):
         pass
 
     @blacklist.command(name="add")
-    async def blacklist_add(self, ctx: commands.Context, *users: List[Union[discord.Member, int]]):
+    async def blacklist_add(self, ctx: commands.Context, *users: Union[discord.Member, int]):
         """
         Adds a user to the blacklist.
         """
@@ -1811,9 +1809,7 @@ async def blacklist_list(self, ctx: commands.Context):
             await ctx.send(box(page))
 
     @blacklist.command(name="remove")
-    async def blacklist_remove(
-        self, ctx: commands.Context, *users: List[Union[discord.Member, int]]
-    ):
+    async def blacklist_remove(self, ctx: commands.Context, *users: Union[discord.Member, int]):
         """
         Removes user from blacklist.
         """
@@ -1842,9 +1838,7 @@ async def localwhitelist(self, ctx: commands.Context):
 
     @localwhitelist.command(name="add")
     async def localwhitelist_add(
-        self,
-        ctx: commands.Context,
-        *users_or_roles: List[Union[discord.Member, discord.Role, int]],
+        self, ctx: commands.Context, *users_or_roles: Union[discord.Member, discord.Role, int]
     ):
         """
         Adds a user or role to the whitelist.
@@ -1875,9 +1869,7 @@ async def localwhitelist_list(self, ctx: commands.Context):
 
     @localwhitelist.command(name="remove")
     async def localwhitelist_remove(
-        self,
-        ctx: commands.Context,
-        *users_or_roles: List[Union[discord.Member, discord.Role, int]],
+        self, ctx: commands.Context, *users_or_roles: Union[discord.Member, discord.Role, int]
     ):
         """
         Removes user or role from whitelist.
@@ -1909,9 +1901,7 @@ async def localblacklist(self, ctx: commands.Context):
 
     @localblacklist.command(name="add")
     async def localblacklist_add(
-        self,
-        ctx: commands.Context,
-        *users_or_roles: List[Union[discord.Member, discord.Role, int]],
+        self, ctx: commands.Context, *users_or_roles: Union[discord.Member, discord.Role, int]
     ):
         """
         Adds a user or role to the blacklist.


Test patch: