diff options
| -rw-r--r-- | bot/exts/moderation/infraction/infractions.py | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/bot/exts/moderation/infraction/infractions.py b/bot/exts/moderation/infraction/infractions.py index 38d1ffc0e..2d72a3db4 100644 --- a/bot/exts/moderation/infraction/infractions.py +++ b/bot/exts/moderation/infraction/infractions.py @@ -76,9 +76,20 @@ class Infractions(InfractionScheduler, commands.Cog): await self.apply_kick(ctx, user, reason) @command() - async def ban(self, ctx: Context, user: FetchedMember, *, reason: t.Optional[str] = None) -> None: - """Permanently ban a user for the given reason and stop watching them with Big Brother.""" - await self.apply_ban(ctx, user, reason) + async def ban( + self, + ctx: Context, + user: FetchedMember, + duration: t.Optional[Expiry] = None, + *, + reason: t.Optional[str] = None + ) -> None: + """ + Permanently ban a user for the given reason and stop watching them with Big Brother. + + If duration is specified, then it would temporarily ban that user for the given duration. + """ + await self.apply_ban(ctx, user, reason, expires_at=duration) @command(aliases=('pban',)) async def purgeban( |