aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/moderation/infraction/infractions.py
diff options
context:
space:
mode:
Diffstat (limited to 'bot/exts/moderation/infraction/infractions.py')
-rw-r--r--bot/exts/moderation/infraction/infractions.py17
1 files changed, 14 insertions, 3 deletions
diff --git a/bot/exts/moderation/infraction/infractions.py b/bot/exts/moderation/infraction/infractions.py
index bf66d5bba..de3367661 100644
--- a/bot/exts/moderation/infraction/infractions.py
+++ b/bot/exts/moderation/infraction/infractions.py
@@ -108,9 +108,20 @@ class Infractions(InfractionScheduler, commands.Cog):
await self.apply_ban(ctx, user, reason, 1, 0, expires_at=duration)
@command(aliases=('vban',))
- async def voiceban(self, ctx: Context, user: FetchedMember, *, reason: t.Optional[str]) -> None:
- """Permanently ban user from using voice channels."""
- await self.apply_voice_ban(ctx, user, reason)
+ async def voiceban(
+ self,
+ ctx: Context,
+ user: FetchedMember,
+ duration: t.Optional[Expiry] = None,
+ *,
+ reason: t.Optional[str]
+ ) -> None:
+ """
+ Permanently ban user from using voice channels.
+
+ If duration is specified, then it would temporarily voice ban that user for the given duration.
+ """
+ await self.apply_voice_ban(ctx, user, reason, expires_at=duration)
# endregion
# region: Temporary infractions