diff --git a/redbot/cogs/mod/settings.py b/redbot/cogs/mod/settings.py index b482c7b64..22864f6d1 100644 --- a/redbot/cogs/mod/settings.py +++ b/redbot/cogs/mod/settings.py @@ -377,9 +377,20 @@ class ModSettings(MixinMeta): async def defaultduration( self, ctx: commands.Context, - duration: Optional[commands.TimedeltaConverter] = timedelta(days=0), + *, + duration: commands.TimedeltaConverter( + minimum=timedelta(seconds=1), default_unit="seconds" + ), ): - """Set the default time to be used when a user is tempbanned.""" + """Set the default time to be used when a user is tempbanned. + + Accepts: seconds, minutes, hours, days, weeks + `duration` must be greater than zero. + + Examples: + `[p]modset defaultduration 7d12h10m` + `[p]modset defaultduration 7 days 12 hours 10 minutes` + """ guild = ctx.guild await self.config.guild(guild).default_tempban_duration.set(duration.total_seconds()) await ctx.send(