Keystone
Docs menu

Safety

Moderation

Ban, kick, timeout and warn members, with a mod log and case history.

On by default9 commandsFree Set up in the dashboard
On this page

Ban, kick, time out and warn members with slash commands. Every action becomes a numbered case in the member's history, can be posted to a mod log channel, and can be sent to the member by DM with the reason. /purge cleans up messages in bulk.

Set it up

  1. In Server Settings → Roles, drag the Keystone role above the members it should moderate. See role order below.
  2. Open the dashboard, pick your server, then Moderation.
  3. Under Mod log, pick a channel. Every ban, kick, timeout and warning is posted there as a numbered case.
  4. Leave Tell members on to DM members when they're warned, timed out, kicked or banned, including the reason. Turn it off to act silently.
  5. Click Save.

You can do the same in Discord with /moderation log-channel, /moderation dm-members and /moderation view.

How it works

Actions

  • /ban bans someone, even if they've already left the server, and can delete their messages from the previous hour, 24 hours or 7 days. /unban lifts it.
  • /kick removes a member. They can rejoin with an invite.
  • /timeout stops a member from chatting, reacting and joining voice for a while, like 10m, 2h or 7d. Discord allows at most 28 days. /untimeout ends it early.
  • /warn records a formal warning with a reason. Nothing else happens to the member, but it stays in their history.

Reasons are optional except for warnings, and can be up to 500 characters. Keystone replies in the channel with the result and the case number.

Cases and history

Each action gets the next case number for your server, with the member, the moderator, the reason, the time and, for timeouts, the duration. /history shows a member's latest 15 cases, newest first, and works for people who have left.

If a mod log channel is set, each case is also posted there as it happens. Automod actions are recorded the same way, with Keystone as the moderator.

DMs to members

With Tell members on, Keystone DMs the member before acting, while they still share the server, so they can read the reason even after a kick or ban. If their DMs are closed, the action still goes through and the reply says the DM couldn't be delivered.

Purge

/purge amount:50 deletes up to 500 recent messages in the current channel, or another one with channel. Narrow it down with:

  • user: only messages from one person.
  • bots: only messages from bots and webhooks.
  • contains: only messages containing some text.

Pinned messages are kept unless you set include_pinned. Discord doesn't let bots bulk delete messages older than 14 days, so /purge stops there. It checks at most the last 1,000 messages per run; run it again to keep going. The result is only shown to you, and a summary goes to the mod log.

Role order

Discord's rules apply to every action:

  • Nobody can act on the server owner, themselves or Keystone.
  • You can only act on members whose highest role is below yours (the owner can act on anyone).
  • Keystone can only act on members whose highest role is below its own.
  • Members with Administrator can't be timed out.

Permissions

Keystone needs Ban Members for /ban and /unban, Kick Members for /kick, Timeout Members for /timeout, /untimeout and automod timeouts, and Manage Messages, Read Message History and View Channel in the channel for /purge. To post cases it needs View Channel, Send Messages and Embed Links in the mod log channel.

By default members need the same permission to use each command: Ban Members, Kick Members, Timeout Members (also for /warn and /history), Manage Messages in the channel for /purge, and Manage Server for /moderation.

Commands

<required> and [optional] show what each one takes. Server managers can turn any command off in the dashboard, or change who can use it in Server Settings → Integrations.

  • /banNeeds Ban Members

    Ban a user from the server.

    /ban <user> [reason] [delete_messages]

  • /unbanNeeds Ban Members

    Lift a ban.

    /unban <user> [reason]

  • /kickNeeds Kick Members

    Kick a member from the server.

    /kick <member> [reason]

  • /timeoutNeeds Timeout Members

    Stop a member from chatting, reacting and joining voice for a while.

    /timeout <member> <duration> [reason]

  • /untimeoutNeeds Timeout Members

    End a member's timeout early.

    /untimeout <member> [reason]

  • /warnNeeds Timeout Members

    Formally warn a member. Recorded in their history.

    /warn <member> <reason>

  • /purgeNeeds Manage Messages

    Bulk delete recent messages in a channel.

    /purge <amount> [channel] [user] [contains] [bots] [include_pinned]

  • /historyNeeds Timeout Members

    Show a user's moderation history.

    /history <user>

  • /moderationNeeds Manage Server

    Configure moderation for this server.

    /moderation log-channel [channel]
    Set where moderation cases are posted. Leave empty to turn off.
    /moderation dm-members <enabled>
    DM members when they are warned, timed out, kicked or banned.
    /moderation view
    Show current settings.

Every command in one place: command reference.

Troubleshooting

“I need the … permission to do that”

Keystone's role is missing that permission. Add it in Server Settings → Roles → Keystone. The dashboard's overview lists anything moderation is missing.

“Their highest role is equal to or above mine”

Drag the Keystone role above that member's highest role in Server Settings → Roles. If the message says “above yours”, it's your own role that's too low: ask someone higher up, or the owner.

“Couldn't DM them (their DMs are closed)”

The member has DMs from server members turned off, or blocks Keystone. The action still happened and the case was recorded.

Nothing shows up in the mod log

Check that a mod log channel is set (/moderation view) and that Keystone has View Channel, Send Messages and Embed Links there. The dashboard flags a deleted channel or missing access.

/purge deleted fewer messages than I asked for

Older messages are past Discord's 14-day bulk delete limit, or fewer messages matched your filters in the last 1,000. The reply says which.