Skip to content

Moderation

Ban, kick, timeout and warn members, delete messages in bulk, and keep a numbered record of every action in a mod log.

Dashboard
Dashboard › General (for the mod log channel)
Commands
/mod ban, /mod kick, /mod timeout, /mod warn, /mod modlog, /mod purge messages, /set modlogs_channel
You need
The Discord permission each command needs, like Ban Members for ban, or a place on Skip the rules for Moderation.
Element needs
Ban Members, Kick Members, Timeout Members and Manage Messages for the commands you use, plus View Audit Log to record actions taken outside Element. Its top role must be above the member's.

What it does

Moderation gives your staff the everyday tools, and keeps a record of what they did.

  • Member actions: ban, temp ban, unban, kick, timeout and untimeout.
  • Warnings: warn a member, list their warnings, and mark one removed.
  • Cases: every action becomes a numbered case you can look up, edit the reason of, or delete.
  • A mod log: each case is posted to a channel you pick, so the whole team sees it.
  • Purge: delete many messages at once, filtered by person, links, files and more.

Element also notices bans, unbans, kicks, timeouts and timeouts being removed done anywhere else, like by hand in Discord or by another bot, and records them as cases too.

Who can use it

Every moderation command except quarantine and unquarantine needs the real Discord permission, like Ban Members for ban or Timeout Members for warn.

To let a mod role use them without that permission, add it to Skip the rules on Moderation, or on one command, in the command rules. Role order still applies, every action still becomes a case, and Anti Nuke counts their bans and kicks against them. Skip the rules on All of Element doesn't cover Moderation commands.

Who and Where, config disable and the other command rules still decide who may try a command and where. Quarantine follows Security's trust levels instead.

Element follows Discord's role order. You can't act on yourself, the server owner, Element, or anyone whose top role is at or above yours (the owner is exempt from that last rule), and Element can't act on anyone at or above its own top role. Put Element's role above the roles it should moderate.

Set it up

  1. Choose the channel for the mod log, on the dashboard's General page or with /set modlogs_channel. Element never creates a channel for you. Running /set modlogs_channel with the same channel again turns the mod log off.
  2. Give Element View Audit Log if you want it to record actions taken outside Element too. Without it, only actions run through Element's own commands become cases.
  3. Decide whether members should see who moderated them, with /set show_mod (see Hiding the moderator).

Cases are saved whether or not a mod log channel is set. The reply to each command says if the card couldn't be posted and why.

Commands

On slash, these are under /mod. With a prefix they're top level, like e!ban.

CommandWhat it does
/mod banBan a member or a user ID, and optionally delete their recent messages (delete: none, 1h, 1d or 7d)
/mod tempbanBan for 10 minutes to a year. Element lifts it by itself
/mod unbanUnban a user by ID
/mod kickKick a member
/mod timeoutTime out a member for 1 minute to 28 days. Also e!mute
/mod untimeoutRemove a timeout. Also e!unmute
/mod warnWarn a member. The reason is required
/mod warningsList a member's warnings, newest first
/mod removewarnMark a warning removed. It keeps its case number
/mod modlogThe server's cases, a member's cases, or one case by number. Also e!case and e!ml
/mod reasonChange a case's reason
/mod deletecaseDelete one case for good
/mod clearcasesDelete every case in the server, or one member's
/mod purge messagesDelete recent messages that match every filter you give
/mod quarantineQuarantine a member. It follows Security's trust levels
/mod unquarantineLift a quarantine

Reasons are optional (except for warn), up to 512 characters. The commands page lists every option and who can use each command.

Quarantine moved

Quarantine still works the same and follows Security's trust levels, not a Discord permission. On a prefix, e!mod q is now e!q (or e!quarantine), and e!mod uq is now e!uq (or e!unquarantine). The slash commands, /mod quarantine and /mod unquarantine, didn't change.

Messages to the member

Ban, temp ban and kick message the member first, since they can't be messaged after they've gone. Warn and timeout message them afterwards, with the case number. A closed DM never stops the action. The message shows who moderated only when show_mod is on.

Cases and the mod log

Every action is a case: a number that's unique in your server, the action, the member, the moderator, the reason, and the time. Numbers start at 1 and go up by one for each new case. A number is never reused, even after you delete its case.

  • /mod modlog with nothing lists the server's cases, newest first, 10 a page. Give it a member to see theirs (it works for people who have left), or a number like 12 to see one case.
  • Warnings are cases too. /mod removewarn marks a warning removed so it stops counting in /mod warnings, but keeps the case and its number. /mod modlog still shows it, marked removed.
  • Changing a reason. /mod reason replaces a case's reason. Its reply shows the reason Before and After, the case's own card in the mod log is edited to match with an Edited by line, and a new "Case reason edited" card is posted, so the channel keeps the whole history. You need Timeout Members, and must be the case's moderator or have Manage Server.
  • Deleting. /mod deletecase and /mod clearcases need Administrator. clearcases asks you first and says how many cases it will delete. Each one leaves a short card in the mod log, so a wiped history leaves a trace.

What the mod log posts

  • Element's own commands post a card at once.
  • Actions done outside Element are picked up from Discord's audit log. Several in a few seconds become one summary card, so a raid can't flood the channel.
  • Purges post a card with the channel, how many messages went, and who they were from. A purge isn't a case.
  • Element's automatic actions, like Anti Nuke or Freeloader, become cases but don't post a card. Security reports them in its own log.

Security's log is separate

Security has its own security log. The mod log is Moderation's, and Security never posts to it. If you also send Security's Logging module's Ban, Unban, Kick or Member Update events to the same channel, you'll see each action twice, so pick one of them.

Hiding the moderator

/set show_mod false hides who took an action from members: in the message they get, and in /mod warnings and /mod modlog for people who aren't Administrators. That covers the Moderator, Removed by and Edited by fields. Administrators always see them, and the mod log channel itself always shows the moderator.

It doesn't change a reason someone typed. Another bot's audit log reason often says "Moderator: Zinc" or similar, and Element stores reasons as written, so that name still shows.

How long cases are kept

Cases are kept until your server deletes them with /mod deletecase or /mod clearcases. They aren't deleted when someone asks Element to delete their data, because they're the server's record. A member's data export lists the cases about them and by them.

If Element leaves your server, your cases are deleted 12 months later, unless Element is invited back first. A re-invite keeps everything, and a server that comes back after the 12 months starts again at case 1. The privacy policy has the full list of what Element keeps.

Purge

/mod purge messages <amount> deletes up to that many recent messages, 1 to 500, that match every filter you give: a user, bots, humans, contains, links, files or embeds. There are also shortcuts like /mod purge bots, /mod purge links and /mod purge files, which delete the last 100 matches unless you give an amount.

  • /mod purge after <message> deletes the messages sent after one message, keeping it. /mod purge until <message> deletes that message too.
  • It never deletes pinned messages or messages older than 14 days (a Discord limit).
  • With a prefix command like e!purge 50, Element also deletes your command message once the purge has deleted something. It isn't counted in the amount.
  • Over 100 messages, Element asks you to confirm first.
  • It needs Manage Messages and Read Message History in that channel, for you and for Element.

Common problems

  • "Your top role must be above…". Element follows Discord's role order. Move your top role above the member's, or ask someone with a higher one.
  • Element can't ban or kick someone. Its own top role must be above theirs. Move Element's role up, ideally near the top.
  • Actions done by hand aren't showing up. Check that Element has View Audit Log and that the action happened while Element was online.
  • The mod log is empty. Pick a channel with /set modlogs_channel or on the dashboard's General page, and check Element can send messages there. Cases are still saved in the meantime.
  • Case numbers skip. A deleted case's number is never reused, so a gap means a case was deleted.
  • A moderation command says you lack permission, but you have a role for it. Give the role the Discord permission, or add it to Skip the rules on Moderation. Skip the rules on All of Element doesn't cover Moderation commands.

Turn it off

Clear the mod log channel (/set modlogs_channel with the same channel again, or Clear on the dashboard) to stop the cards. Turn commands off with /config disable. Cases already saved stay until you delete them.

That doesn't stop case recording. While Element has View Audit Log, bans, unbans, kicks, timeouts and timeout removals done anywhere still become cases, with or without a mod log channel. Take that permission away to stop it, and only Element's own commands will make cases.