diff options
| author | 2019-10-02 11:38:29 -0700 | |
|---|---|---|
| committer | 2019-10-02 11:38:29 -0700 | |
| commit | 610de3e0767c5c2fba519998d64e036444310c70 (patch) | |
| tree | 0e135d4bdf3eff05f6d06ec78200d55f97132767 | |
| parent | Add help category for Infractions and ModManagement cogs (diff) | |
Format duration units as a list in infractions doctsrings
Co-Authored-By: scragly <[email protected]>
| -rw-r--r-- | bot/cogs/moderation/infractions.py | 46 |
1 files changed, 37 insertions, 9 deletions
diff --git a/bot/cogs/moderation/infractions.py b/bot/cogs/moderation/infractions.py index b2b03e46c..856d5f1a9 100644 --- a/bot/cogs/moderation/infractions.py +++ b/bot/cogs/moderation/infractions.py @@ -74,13 +74,20 @@ class Infractions(Scheduler, commands.Cog): # endregion # region: Temporary infractions - @command(aliases=('mute',)) + @command(aliases=["mute"]) async def tempmute(self, ctx: Context, user: Member, duration: Duration, *, reason: str = None) -> None: """ Temporarily mute a user for the given reason and duration. - A unit of time should be appended to the duration: - y (years), m (months), w (weeks), d (days), h (hours), M (minutes), s (seconds) + A unit of time should be appended to the duration. + Units (∗case-sensitive): + \u2003`y` - years + \u2003`m` - months∗ + \u2003`w` - weeks + \u2003`d` - days + \u2003`h` - hours + \u2003`M` - minutes∗ + \u2003`s` - seconds """ await self.apply_mute(ctx, user, reason, expires_at=duration) @@ -89,8 +96,15 @@ class Infractions(Scheduler, commands.Cog): """ Temporarily ban a user for the given reason and duration. - A unit of time should be appended to the duration: - y (years), m (months), w (weeks), d (days), h (hours), M (minutes), s (seconds) + A unit of time should be appended to the duration. + Units (∗case-sensitive): + \u2003`y` - years + \u2003`m` - months∗ + \u2003`w` - weeks + \u2003`d` - days + \u2003`h` - hours + \u2003`M` - minutes∗ + \u2003`s` - seconds """ await self.apply_ban(ctx, user, reason, expires_at=duration) @@ -126,8 +140,15 @@ class Infractions(Scheduler, commands.Cog): """ Temporarily mute a user for the given reason and duration without notifying the user. - A unit of time should be appended to the duration: - y (years), m (months), w (weeks), d (days), h (hours), M (minutes), s (seconds) + A unit of time should be appended to the duration. + Units (∗case-sensitive): + \u2003`y` - years + \u2003`m` - months∗ + \u2003`w` - weeks + \u2003`d` - days + \u2003`h` - hours + \u2003`M` - minutes∗ + \u2003`s` - seconds """ await self.apply_mute(ctx, user, reason, expires_at=duration, hidden=True) @@ -138,8 +159,15 @@ class Infractions(Scheduler, commands.Cog): """ Temporarily ban a user for the given reason and duration without notifying the user. - A unit of time should be appended to the duration: - y (years), m (months), w (weeks), d (days), h (hours), M (minutes), s (seconds) + A unit of time should be appended to the duration. + Units (∗case-sensitive): + \u2003`y` - years + \u2003`m` - months∗ + \u2003`w` - weeks + \u2003`d` - days + \u2003`h` - hours + \u2003`M` - minutes∗ + \u2003`s` - seconds """ await self.apply_ban(ctx, user, reason, expires_at=duration, hidden=True) |