Ledra Docs

Moderation

Warnings, kicks, bans, timeouts — and the case log that ties them together.

Every moderation action Ledra performs is written down as a case with a number that counts up per server. Case #1 is the first thing that ever happened on your server; there is no separate warning list, ban list and mute list to reconcile.

The case system#

One action, one case, one number:

/warn member:@Someone reason:Spamming in #general
→ Warned @Someone — case #47. Active warnings: 3

That number is the handle for everything afterwards:

/case number:47        Full details of that single case
/unwarn case:47        Revoke it

Each case records the member, the moderator, the reason, when it happened, when it expires (for temp-bans and timeouts), and whether it is still active.

Warnings, timeouts, kicks, bans, temp-bans and unbans all live in the same history. /modlogs member:@Someone shows the whole story of one member in order, instead of you checking three places.

Cases are never deleted. Revoking a warning marks it inactive and records who did it — the history stays honest.

Choosing the right action#

Situation Use Why
First minor offence /warn Leaves a record, costs nothing
Needs to cool off /timeout Discord-native mute, max 28 days, expires on its own
Should leave but may return /kick They can rejoin with a new invite
Repeat offender, time-limited /tempban Lifted automatically when it expires
Done /ban Permanent until you lift it

Warnings#

/warn member:@Someone reason:Please stop
/warnings member:@Someone      List their active warnings
/unwarn case:47 reason:Appealed successfully
/clearwarns member:@Someone    Revoke all of them (Admin only)

A reason is required for /warn — a warning nobody can explain later is worse than no warning. The reply tells you how many active warnings the member now has.

/clearwarns needs the Administrator level and asks for confirmation, showing how many warnings it is about to revoke.

Timeouts#

A timeout uses Discord's own mute. The member stays on the server, sees everything, and cannot speak or react.

/timeout member:@Someone duration:2h reason:Cool down
/untimeout member:@Someone

Discord caps timeouts at 28 days. Ask for longer and Ledra tells you to use /tempban instead. Timeouts also end on their own — Ledra logs the end even when it happens without a command.

Kicks and bans#

/kick member:@Someone reason:Ignoring staff
/ban user:@Someone reason:Raid account delete_days:1
/tempban user:@Someone duration:7d reason:Repeated spam
/unban user:123456789012345678 reason:Appeal accepted
  • delete_days (0–7) also removes that user's recent messages. 1 is a good default for raid accounts; leave it at 0 for ordinary bans so you keep the evidence.
  • /ban accepts a user ID, so you can ban someone who is not on the server yet. Hierarchy checks are skipped when they were never a member — there is no role to compare.
  • /unban takes the user ID, because a banned user cannot be mentioned.

Temp-bans expire by themselves#

/tempban stores an expiry. Ledra checks every 30 seconds and lifts the ban when the time comes.

If Ledra was offline when a temp-ban expired, it catches up on the next start and lifts it then. Nothing is silently forgotten.

Cleaning up messages#

/purge amount:50
/purge amount:100 member:@Spammer

amount is how many recent messages to examine (1–200), not how many will match. With member: set, Ledra checks the last N messages and deletes only that member's — so amount:100 member:@Spammer may delete 4.

Discord does not allow bulk deletion of messages older than 14 days. If your purge hits them, Ledra tells you instead of failing silently.

Reading the history#

/modlogs                     15 most recent cases on the server
/modlogs member:@Someone     That member's history
/case number:47              One case in full

DM notifications#

By default, Ledra tries to tell a member when they are warned, timed out, kicked or banned, including the reason.

/settings dm enabled:false     Turn it off server-wide

If the DM cannot be delivered — closed DMs, or the bot is blocked — the confirmation says so. The action still happened. A member cannot avoid moderation by closing their DMs.

Actions taken outside Ledra#

If someone bans a member with Discord's own UI or another bot, Ledra still writes it to your moderation log. It cannot know who was responsible, so the entry points you at Discord's audit log.

These entries do not get a case number — Ledra only numbers what it did itself, so the case log stays a record of Ledra's own actions.

Moderation command reference · Duration formats

Ledra documentation. Everything here describes the hosted bot.