Skip to content

Durations

How jail durations work, supported units, and the Forever option.

2 min readCore Features

The /jail command takes a duration as an amount plus a unit. This determines how long the member stays jailed before the sweeper auto-releases them.

Supported units

UnitExampleNotes
Seconds30sShort detentions for testing or spam
Minutes15mCommon for minor infractions
Hours2hStandard moderation action
Days7dSerious offences
Weeks2wExtended detention
Months1moLong-term (rare)
Years1yrMaximum fixed duration
Forever∞Indefinite, no auto-release

When Forever is selected, the amount is ignored. The member must be manually released by a moderator or through an appeal.

How the sweeper works

A background job runs on a configurable interval (default 30 seconds). It:

  1. Queries the database for cases where the expiry time has passed
  2. Releases each expired case (roles restored, case marked as expired)
  3. Uses a conditional UPDATE so the same case is never released twice

The sweeper also runs once at bot startup, so restarting the bot mid-sentence never loses a pending release.

Configuring the sweep interval

The sweep interval is configured via the SWEEP_INTERVAL_SECONDS environment variable. The default is 30 seconds. Lower values release cases faster but increase database load.

Duration display

JSD displays durations in a human-readable format:

  • 15m shows as "15 minutes"
  • 2h shows as "2 hours"
  • 7d shows as "7 days"
  • Forever shows as "Forever"

The remaining time is displayed in the case record and in the member's web dashboard status.

Practical examples

OffenceSuggested duration
Spam10 minutes to 1 hour
Harassment1 to 7 days
NSFW7 to 30 days
Repeated offencesEscalating via the escalation system
Severe / ongoingForever (manual release)