Durations
How jail durations work, supported units, and the Forever option.
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
| Unit | Example | Notes |
|---|---|---|
| Seconds | 30s | Short detentions for testing or spam |
| Minutes | 15m | Common for minor infractions |
| Hours | 2h | Standard moderation action |
| Days | 7d | Serious offences |
| Weeks | 2w | Extended detention |
| Months | 1mo | Long-term (rare) |
| Years | 1yr | Maximum 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:
- Queries the database for cases where the expiry time has passed
- Releases each expired case (roles restored, case marked as
expired) - Uses a conditional
UPDATEso 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:
15mshows as "15 minutes"2hshows as "2 hours"7dshows 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
| Offence | Suggested duration |
|---|---|
| Spam | 10 minutes to 1 hour |
| Harassment | 1 to 7 days |
| NSFW | 7 to 30 days |
| Repeated offences | Escalating via the escalation system |
| Severe / ongoing | Forever (manual release) |