diff options
author | 2022-05-28 00:43:37 +0200 | |
---|---|---|
committer | 2022-05-27 22:43:37 +0000 | |
commit | 777e7e71266980b6b45b981d822d43835518900e (patch) | |
tree | 337af88b3e48529339636fc175ccb05bac0b9485 | |
parent | Merge pull request #2156 from Numerlor/revert-markdownify-bump (diff) |
Fix !clean users command to handle more than one user (#2178)
* Fix !clean users command to properly handle more than one user
* Make !clean user an alias of !clean users instead of the other way around
Co-authored-by: Xithrius <[email protected]>
-rw-r--r-- | bot/exts/moderation/clean.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bot/exts/moderation/clean.py b/bot/exts/moderation/clean.py index fedb787f9..67f1851c4 100644 --- a/bot/exts/moderation/clean.py +++ b/bot/exts/moderation/clean.py @@ -486,24 +486,24 @@ class Clean(Cog): await self._clean_messages(ctx, channels, bots_only, users, regex, first_limit, second_limit) - @clean_group.command(name="user", aliases=["users"]) - async def clean_user( + @clean_group.command(name="users", aliases=["user"]) + async def clean_users( self, ctx: Context, - user: User, + users: Greedy[User], message_or_time: CleanLimit, *, channels: CleanChannels = None ) -> None: """ - Delete messages posted by the provided user, stop cleaning after reaching `message_or_time`. + Delete messages posted by the provided users, stop cleaning after reaching `message_or_time`. `message_or_time` can be either a message to stop at (exclusive), a timedelta for max message age, or an ISO datetime. If a message is specified, `channels` cannot be specified. """ - await self._clean_messages(ctx, users=[user], channels=channels, first_limit=message_or_time) + await self._clean_messages(ctx, users=users, channels=channels, first_limit=message_or_time) @clean_group.command(name="bots", aliases=["bot"]) async def clean_bots(self, ctx: Context, message_or_time: CleanLimit, *, channels: CleanChannels = None) -> None: |