What a case is
Every sanction Petto takes (ban, kick, mute, warn, and their variants) creates a case: a permanent, numbered record stored server-side, independent of Discord’s own audit log (which expires and can’t be edited or searched by user).
What’s on a case
- A type (
ban,hardban,tempban,softban,unban,kick,mute,tempmute,unmute,warn,jail,unjail) - The target and the moderator who took the action
- A reason, if one was given
- A duration, for temporary actions
- Whether it’s still active (a tempban/tempmute that hasn’t expired or been manually removed yet)

In Discord: one case looked up by its number.
Automatic expiry
tempban and tempmute cases carry an expiry timestamp. A background job checks for expired ones and lifts the sanction automatically, no command needed. When that happens, the case is marked inactive but stays in the history.
A jail with a duration ends the same way: the job gives the roles back and writes an unjail case. The case the job writes has Petto as its moderator and Automatic expiry as its reason.

In Discord: a tempban whose time is up, lifted by Petto with its own case.
Manual unban/unmute
Running!ban remove or !mute remove early does two things: lifts the sanction immediately, and marks the original tempban/tempmute case inactive. It does not delete the case, the history stays intact, only its active status changes. A fresh unban-type case is also created recording who reversed it and why.

In Discord: an early unban, then the tempban case: still in the history, no longer active.
Editing and deleting
!case edit changes a case’s reason or duration after the fact, useful for correcting a typo or extending a punishment. !case delete removes one permanently, !case delete-all wipes an entire user’s history, both are one-way and don’t undo the underlying sanction (a deleted ban case doesn’t unban anyone).
A new duration only works on tempban and tempmute cases and counts from now (a tempmute keeps Discord’s 28 day limit). !case delete-all needs Administrator and asks for a confirmation first.

In Discord: a tempban made longer, with a new reason.

Dashboard → Moderation → Case log: Edit opens the reason of the case, with Save reason and Delete case.

Dashboard → Moderation → Case Log: every case with its number, type, member, moderator, date and reason.