mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
Fix type hints for var-positional parameters in whitelist/blacklist commands (#3577)
* Fix type hints in whitelist/blacklist commands * fix formatting (yay for black diff in CI again)
This commit is contained in:
parent
e70fcef651
commit
54b712fa71
@ -1719,7 +1719,7 @@ class Core(commands.Cog, CoreLogic):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
@whitelist.command(name="add")
|
@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.
|
Adds a user to the whitelist.
|
||||||
"""
|
"""
|
||||||
@ -1747,9 +1747,7 @@ class Core(commands.Cog, CoreLogic):
|
|||||||
await ctx.send(box(page))
|
await ctx.send(box(page))
|
||||||
|
|
||||||
@whitelist.command(name="remove")
|
@whitelist.command(name="remove")
|
||||||
async def whitelist_remove(
|
async def whitelist_remove(self, ctx: commands.Context, *users: Union[discord.Member, int]):
|
||||||
self, ctx: commands.Context, *users: List[Union[discord.Member, int]]
|
|
||||||
):
|
|
||||||
"""
|
"""
|
||||||
Removes user from whitelist.
|
Removes user from whitelist.
|
||||||
"""
|
"""
|
||||||
@ -1775,7 +1773,7 @@ class Core(commands.Cog, CoreLogic):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
@blacklist.command(name="add")
|
@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.
|
Adds a user to the blacklist.
|
||||||
"""
|
"""
|
||||||
@ -1812,9 +1810,7 @@ class Core(commands.Cog, CoreLogic):
|
|||||||
await ctx.send(box(page))
|
await ctx.send(box(page))
|
||||||
|
|
||||||
@blacklist.command(name="remove")
|
@blacklist.command(name="remove")
|
||||||
async def blacklist_remove(
|
async def blacklist_remove(self, ctx: commands.Context, *users: Union[discord.Member, int]):
|
||||||
self, ctx: commands.Context, *users: List[Union[discord.Member, int]]
|
|
||||||
):
|
|
||||||
"""
|
"""
|
||||||
Removes user from blacklist.
|
Removes user from blacklist.
|
||||||
"""
|
"""
|
||||||
@ -1843,9 +1839,7 @@ class Core(commands.Cog, CoreLogic):
|
|||||||
|
|
||||||
@localwhitelist.command(name="add")
|
@localwhitelist.command(name="add")
|
||||||
async def localwhitelist_add(
|
async def localwhitelist_add(
|
||||||
self,
|
self, ctx: commands.Context, *users_or_roles: Union[discord.Member, discord.Role, int]
|
||||||
ctx: commands.Context,
|
|
||||||
*users_or_roles: List[Union[discord.Member, discord.Role, int]],
|
|
||||||
):
|
):
|
||||||
"""
|
"""
|
||||||
Adds a user or role to the whitelist.
|
Adds a user or role to the whitelist.
|
||||||
@ -1876,9 +1870,7 @@ class Core(commands.Cog, CoreLogic):
|
|||||||
|
|
||||||
@localwhitelist.command(name="remove")
|
@localwhitelist.command(name="remove")
|
||||||
async def localwhitelist_remove(
|
async def localwhitelist_remove(
|
||||||
self,
|
self, ctx: commands.Context, *users_or_roles: Union[discord.Member, discord.Role, int]
|
||||||
ctx: commands.Context,
|
|
||||||
*users_or_roles: List[Union[discord.Member, discord.Role, int]],
|
|
||||||
):
|
):
|
||||||
"""
|
"""
|
||||||
Removes user or role from whitelist.
|
Removes user or role from whitelist.
|
||||||
@ -1910,9 +1902,7 @@ class Core(commands.Cog, CoreLogic):
|
|||||||
|
|
||||||
@localblacklist.command(name="add")
|
@localblacklist.command(name="add")
|
||||||
async def localblacklist_add(
|
async def localblacklist_add(
|
||||||
self,
|
self, ctx: commands.Context, *users_or_roles: Union[discord.Member, discord.Role, int]
|
||||||
ctx: commands.Context,
|
|
||||||
*users_or_roles: List[Union[discord.Member, discord.Role, int]],
|
|
||||||
):
|
):
|
||||||
"""
|
"""
|
||||||
Adds a user or role to the blacklist.
|
Adds a user or role to the blacklist.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user