History commands
Created by Maxime_48 · 2 hours ago · Views: 2
Look up what moderation records a member has on your server, let members check their own, and wipe a member's finished records when they have earned a clean slate.
Three commands do this: /history (staff), /my-history (anyone) and /clear-history (staff, deletes).
🔎 See a member's record: /history
- Copy the member's Discord user ID: in Discord turn on Developer Mode (User Settings, Advanced), right-click the member, Copy User ID.
- Type
/history, paste the ID intouser_id, press Enter. - The bot answers privately, only to you, with the last 10 records, newest first.
Each line reads like this:
1. BAN 🔴 (3d) - spamming invites - 2 hours ago #418
- the type in capitals (BAN, MUTE, KICK, WARN, SOFTBAN, UNBAN, UNMUTE)
- 🔴 when the record is still active
- the duration in brackets for bans, mutes and softbans
- the reason, or "No reason"
- when it happened
- the case number after the
#. That is the number to use with/reasonto change the wording of a record.
You need the Kick Members permission in Discord to see the command. The same list, with more detail, is on the panel: Moderation → History tab, a table with one row per record that you can filter by type and by status.
🙋 Let members see their own record: /my-history
Anyone can type /my-history. The bot shows them the last 10 moderation records the server holds about them, privately. It is a quick way to settle "what did I get warned for?" without bothering the staff.
- It needs the Moderation feature enabled on your server. If it is off, the member gets a message saying so.
- It ignores your Allowed moderator roles setting: no role is needed.
- With a text command prefix set,
!my-historyworks too, but a text reply cannot be private: the bot posts it in the channel and deletes it after 30 seconds. - A member with no records gets "You have no moderation records on this server."
The member's own page on the panel, My Sanctions, lists the same records across every server.
🧹 Clear a member's finished records: /clear-history
/clear-history deletes every record that is no longer active for one member on your server. Use it when someone has served their time and you want a clean file.
- Make sure the member has nothing active (see below).
- Type
/clear-history, paste the member's user ID intouser_id, press Enter. - The bot answers Cleared N inactive records for @member or No inactive records found for @member.
This cannot be undone. The records are deleted, not hidden.
What counts as inactive
| Record | When it becomes inactive |
|---|---|
| Ban, mute | Once it ends or is lifted (unban, unmute, expiry, or Lift on the panel) |
| Warn, softban | Only when a moderator removes it from the panel (Moderation → History tab → Remove on the record). A warning has no end date. |
| Kick, unban, unmute | Immediately: these are already inactive when they are written |
Active records are left alone. If you want a member's warnings gone too, remove them on the panel first, then run /clear-history.
Who can use it
All of these must be true:
- the Moderation feature is enabled on the server
- the person has the Ban Members permission in Discord (note: higher than
/history, which needs Kick Members) - if you set Allowed moderator roles (slash commands) in the Moderation settings, they also hold one of those roles
The same action on the panel
Moderation → History tab, then Clear all on any finished (not active) record of that member: click it, then click again where it says Click again to confirm. It removes all that member's finished records, the same deletion as the command.
The panel button writes a line in your server's Activity Log ("Cleared N inactive sanction(s)...") and, if you set a moderation log channel, posts there too. The /clear-history command writes neither: it leaves no entry in the Activity Log and posts nothing in the log channel. If your team wants a visible trail, use the panel button, or write a line in your log channel by hand.
💡 Example
A member was warned twice in March and muted for a day in April. It is October and they have behaved.
/history user_id:123456789012345678shows: MUTE (1d, no dot, finished), WARN 🔴, WARN 🔴.- The two warnings are still 🔴, so
/clear-historyalone would remove only the mute. - On the panel: Moderation → History tab, find the member, and click Remove on each warning's row.
- Now
/clear-history user_id:123456789012345678. The bot answers Cleared 3 inactive records and the member's file is empty.
🔧 When something goes wrong
🚨 "The Moderation feature is not enabled for this server"
Turn the feature on in the panel, then try again. The message contains the link.
🚨 "You do not have a role that is allowed to use moderation commands on this server"
Your server limits moderation commands to certain roles. Ask an admin to add yours under Allowed moderator roles (slash commands), or to empty that list.
🚨 I cannot see /clear-history in the command list
Discord hides it from anyone without Ban Members. A server admin can also change who sees it in Server Settings → Integrations → YAWBDB.
🚨 "No inactive records found" but /history shows records
The records are still active. Lift or remove them on the panel first (warnings and softbans are only ever removed by hand).
🚨 "Failed to clear history" or "Server not registered in panel"
The bot could not reach the panel, or the server is not connected to it. Try again in a minute; if the server is new, finish connecting it first.
🚨 I cleared the wrong member
It cannot be restored. Re-create the records from your own notes or your Activity Log; the Activity Log keeps a line only for a clear made from the panel.
🚨 /my-history says the server is not registered
Same cause as above: the server is not connected to the panel.