diff options
Diffstat (limited to '')
| -rw-r--r-- | bot/exts/moderation/infraction/_scheduler.py | 6 | 
1 files changed, 6 insertions, 0 deletions
| diff --git a/bot/exts/moderation/infraction/_scheduler.py b/bot/exts/moderation/infraction/_scheduler.py index 57aa2d9b6..97d29eb60 100644 --- a/bot/exts/moderation/infraction/_scheduler.py +++ b/bot/exts/moderation/infraction/_scheduler.py @@ -137,8 +137,14 @@ class InfractionScheduler:          icon = _utils.INFRACTION_ICONS[infr_type][0]          reason = infraction["reason"]          expiry = time.format_infraction_with_duration(infraction["expires_at"]) +        expiry_datetime = arrow.get(infraction["expires_at"])          id_ = infraction['id'] +        now_datetime = arrow.utcnow() +        if expiry_datetime < now_datetime: +            await ctx.send(":x: Expiration is in the past.") +            return False +          if user_reason is None:              user_reason = reason | 
