(timer): Lower limit on stage length.

This commit is contained in:
2022-01-11 17:55:22 +02:00
parent 271ecfffa4
commit 331dece859

View File

@@ -276,6 +276,12 @@ async def _pomo_admin(ctx, flags):
break_length = int(breaksplits[0])
channelname = breaksplits[1].strip() if len(breaksplits) > 1 else None
# Check the stages aren't too short
if focus_length < 5:
return await ctx.error_reply("The focus duration must be at least 5 minutes!")
if break_length < 5:
return await ctx.error_reply("The break duration must be at least 5 minutes!")
# Create or update the timer
if not timer:
# Create timer