Skip to content

Commit

Permalink
[ModManager] fix greedy
Browse files Browse the repository at this point in the history
  • Loading branch information
japandotorg committed Jan 12, 2024
1 parent 5261f40 commit 19b3e03
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions modmanager/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ async def _ban(
self,
ctx: commands.GuildContext,
add_or_remove: Literal["add", "remove"],
users: commands.Greedy[discord.User],
users: commands.Greedy[commands.RawUserIdConverter],
*,
reason: str = "No reason provided.",
):
"""Force add users to the ban list."""
if add_or_remove.lower() == "add":
await self.manager._add_to_ban_list(users, ctx.guild, reason)
await self.manager._add_to_ban_list(users, ctx.guild, reason) # type: ignore
elif add_or_remove.lower() == "remove":
if not await self.manager._get_ban_list(ctx.guild):
await ctx.send(
Expand All @@ -88,7 +88,7 @@ async def _ban(
allowed_mentions=discord.AllowedMentions(replied_user=False),
)
return
await self.manager._remove_from_ban_list(users, ctx.guild)
await self.manager._remove_from_ban_list(users, ctx.guild) # type: ignore
else:
await ctx.send_help(ctx.command)
return
Expand All @@ -103,13 +103,13 @@ async def _kick(
self,
ctx: commands.GuildContext,
add_or_remove: Literal["add", "remove", "clear"],
users: commands.Greedy[discord.User],
users: commands.Greedy[commands.RawUserIdConverter],
*,
reason: str = "No reason provided.",
):
"""Force add users to the kick list."""
if add_or_remove.lower() == "add":
await self.manager._add_to_kick_list(users, ctx.guild, reason)
await self.manager._add_to_kick_list(users, ctx.guild, reason) # type: ignore
elif add_or_remove.lower() == "remove":
if not await self.manager._get_kick_list(ctx.guild):
await ctx.send(
Expand All @@ -118,7 +118,7 @@ async def _kick(
allowed_mentions=discord.AllowedMentions(replied_user=False),
)
return
await self.manager._remove_from_kick_list(users, ctx.guild)
await self.manager._remove_from_kick_list(users, ctx.guild) # type: ignore
else:
await ctx.send_help(ctx.command)
return
Expand Down

0 comments on commit 19b3e03

Please sign in to comment.