Skip to content

Protection in depth

Protection is the shield against people who already have power on your server: a moderator whose account was stolen, an admin who goes rogue, a "moderation" bot that turns into a nuke bot. It doesn't prevent anything: Discord lets the action happen, then iHorizon undoes it and sanctions its author, within moments. The full list of rules, sanctions and panel controls is on the Protection command page; this page explains how the pieces behave together.

How a single action is judged

Discord reports every entry of the server's audit log to iHorizon as it is written, with the member who did it. For each entry, iHorizon goes through these steps. The first one that lets the action through ends it.

Was it iHorizon? Then nothing happens. This covers every command iHorizon runs for someone (/mod ban, /backup load…), night mode, and Protection's own repairs.

Is a rule watching this action, and is it enabled? Thirteen rules cover channels, roles, members, webhooks and the server settings. An action no rule covers is ignored.

Was it the Discord server owner or one of the server's iHorizon owners (the /owner list)? Then it's let through, whatever the rule says.

Who may bypass this rule? Everyone: let through. Member(s) of allowlist: let through if the author is on the allowlist. Nobody. (Except server owner): never let through.

Discord permissions play no part: an Administrator is judged exactly like a member.

Undo and sanction. The action is reverted and, at the same time, the author receives the rule's sanction (or the global one). The sanction goes first in iHorizon's queue: stopping the attacker beats repairing.

Two rules have a built-in exception:

  • Member role edits leaves alone a member who picks their own roles through Discord's Onboarding or Channels & Roles, as long as every role changed is one the server offers there. Giving yourself a role that grants Administrator that way still counts.
  • Admin role grants only reacts when the Administrator permission is really handed out: an admin role given to a member, a role created with Administrator, or Administrator added to an existing role (@everyone included). When it applies to the same action as Role creation, Role edits or Member role edits, its own sanction is the one used.

What gets undone

What the author did What iHorizon does
Deleted a channel or a category Recreates it with its settings, category and permissions; channels of a deleted category go back into the recreated one
Deleted a role Recreates it (name, permissions, colour, icon, position, channel permissions) and gives it back to its members, except the author
Created a channel, a role or a webhook Deletes it
Edited a channel, a role, a webhook or the server Puts the previous values back
Added or removed roles on a member Removes the added roles and gives the removed ones back (except when the author changed their own roles: then the added roles are removed, but nothing is given back, so the repair doesn't undo their sanction)
Banned someone Unbans them
Unbanned someone Bans them again
Kicked or pruned members, deleted a webhook Nothing can be undone: the author is only sanctioned

Keep iHorizon's role on top

iHorizon can't remove a role placed above its own, can't sanction a member whose highest role is above its own, and places the roles it recreates just below its own at most. An attacker sitting above iHorizon is out of reach.

Sanctions, and the burst rule

Sanction Effect on the author
Cancel the actions only Nothing: their actions are still undone
Cancel + Mute (10 min) Timed out for 10 minutes. An Administrator can't be timed out, so they are deranked first
Cancel + Derank Every role iHorizon can remove is removed. A bot also sees its own integration role reduced to View Channel
Cancel + Kick Deranked, then kicked (so a role saver can't hand the roles back on rejoin)
Cancel + Ban Banned; deranked instead if iHorizon can't ban them

A nuke doesn't delete one channel, it deletes forty in two seconds. Protection handles that like this:

  • Every action is undone, one by one, however many there are.
  • The author is sanctioned once. iHorizon remembers the sanction it gave to that member for 60 seconds, and doesn't repeat it for each channel.
  • Only a harsher sanction replaces it. If, during those 60 seconds, the same member breaks a rule whose sanction is more severe (the order is the one of the table above, Ban being the most severe), that sanction is applied on top. A lighter one is skipped.

So with Channel deletion on Cancel + Mute (10 min) and Ban members on Cancel + Ban, a raider who deletes channels then starts banning is muted at the first channel, then banned at the first ban.

Derank is the safest global sanction

A derank works on almost everyone below iHorizon, administrators included, and removes the power in one step. Kick and ban go further but leave nothing to review: with a derank, the account is still on the server, powerless, and you decide in the morning whether it was stolen.

What Protection can't see

  • Anything iHorizon does. /mod ban, /mod kick, /backup load, /mod lock-all, night mode, the derogation role… The author recorded by Discord is iHorizon, so Protection skips it. Those are guarded by command rules and usage limits: for example mod ban at Perm 5 and 5 uses per 10 minutes.
  • Actions no rule covers: deleted messages, timeouts, nicknames, emojis and stickers, invites, threads, voice moves and disconnects, AutoMod rule changes. Adding a bot is the bot blocker's job.
  • The owners. The Discord owner and the /owner list are never checked, even on a rule set to Nobody.
  • What happens while iHorizon is offline. Protection reacts to Discord's live events; an action made during an outage is not caught afterwards.
  • What can't be repaired: a kick, a prune or a deleted webhook. The author is sanctioned, but the members must be invited back and the webhook recreated.

The trick is to make Discord permissions useless for destructive actions, and send all moderation through iHorizon, where the command rules apply:

Rule Bypass Why
Admin role grants Nobody. (Except server owner) Nobody but the owners should ever hand out Administrator
Server edits Nobody. (Except server owner) Name, vanity, verification level, 2FA requirement
Channel deletion, Role deletion Member(s) of allowlist The core of a nuke
Webhooks Member(s) of allowlist Webhooks are a favourite spam channel
Ban members, Kick members Member(s) of allowlist Moderators ban with /mod ban, which Protection doesn't see and /perm controls. A ban made by hand is reverted
Role edits, Member role edits Member(s) of allowlist Only if your staff never changes roles by hand: otherwise leave them off and rely on Admin role grants

Other bots

A ticket bot that creates channels, a moderation bot that bans: if a rule covers what they do, they are reverted and sanctioned like anyone else. Add the ones you trust to the allowlist with /allowlist add member:@TheBot.

Allowlist or owner list?

Both lists are about trust, but they don't open the same doors:

Allowlist (/allowlist) Server's iHorizon owners (/owner)
Managed by The Discord server owner only Anyone already on it, with /owner (the Discord server owner always is)
Protection Lets them through the rules set to Member(s) of allowlist only Lets them through every rule, even Nobody
Command rules (/perm) and limits (/commandlimit) No effect Pass every rule and every limit
Message shields, night mode No effect No effect

Put on the allowlist the people who may legitimately delete a channel or ban by hand: a co-owner, a trusted head admin, your other moderation bot. Keep the /owner list for the very few people you would hand the server to. The trust lists guide covers the allowlist, the owner list and the blacklists in detail.

Next