Night mode & derogation
Most takeovers happen at night: the staff is asleep, nobody watches the audit log, and a single stolen admin account is enough to wipe the server or steal its vanity link. Night mode shrinks that risk by making sure nobody but the owner has Administrator during the hours you choose. It's configured with /nightmode, by the Discord server owner only.
What happens during a night
Every minute, iHorizon looks at the time in the server's timezone. The timezone is a real one (Europe/Paris, America/New_York…), so daylight saving time is followed. A range can cross midnight, like 23:00 to 08:00.
The night starts. iHorizon checks that it has Administrator, that its own role has Administrator, and that its own role is the highest role of the server. If one check fails, nothing is changed and, if Warn server owner is on, the owner gets a DM saying why, once. iHorizon tries again every minute: the night starts as soon as the problem is fixed.
Administrator is removed from every role that has it, except iHorizon's own role and, depending on your settings, the roles of bots. Every other permission on those roles stays. Each role changed is written down, one by one, so it can be given back. A role iHorizon can't edit keeps Administrator, and iHorizon tries again every minute until it's done.
The night ends. The same checks run, then every role written down gets Administrator back. The owner gets the list of roles changed, if notifications are on.
The following roles have been modified:
@Head Admin
What the server owner receives in DM at the start of the night, with Warn server owner on.
Who keeps Administrator at night
| Who | At night |
|---|---|
| The Discord server owner | Keeps full power: Discord gives it to the owner whatever their roles |
| iHorizon | Keeps Administrator: its own role is never touched |
Members with an admin role, administrators, the allowlist, the /owner list |
Lose Administrator, like everyone else |
| Bots, with Derank bots off | Keep the Administrator of their own integration role |
| Bots, with Derank bots on | Lose it, except the bots picked in Bots authorized to be admin during the night (20 at most) |
Only Administrator is removed
Night mode removes one permission. A role that has Administrator and Ban Members, Manage Channels or Manage Roles ticked keeps those at night. If your admin roles are built that way, a stolen account can still ban or delete channels by hand: that's Protection's job. Night mode is a layer, not a lock.
Bot roles
Bots authorized to be admin during the night only protects a bot's own integration role (the one Discord creates when the bot joins). A normal role with Administrator given to a bot is stripped like any other role.
Giving roles back, and retries
- Each role is written down as soon as it's changed. If iHorizon restarts in the middle of a night, the list survives, and the morning restore still finds it.
- A night (or a morning) isn't over until every role is done. A role that can't be edited stays on the list, and iHorizon tries again every minute until it works. A role deleted during the night is simply dropped.
- If a check fails in the morning (iHorizon lost Administrator, or its role is no longer the highest), nothing is given back yet and the owner is warned, once. iHorizon keeps trying every minute: fix iHorizon's role and the roles get Administrator back within a minute.
- Turning night mode off during the night gives the roles back, whether you do it from
/nightmodeor the dashboard: within a minute, every role written down gets Administrator back (right away from the/nightmodepanel). - A role given Administrator during the night keeps it until the next start: night mode only removes it when the night begins. Protection's Admin role grants rule is what catches that.
The DM the owner gets when iHorizon's role isn't the highest one: no role was changed.
Night mode and the other shields
- Protection ignores night mode. The role changes are made by iHorizon, so the Role edits rule doesn't revert them, and Admin role grants doesn't fire in the morning.
- Administrators lose their AntiSpam and honeypot exemption at night if they only had it through Administrator. A moderator who also has Manage Server, Ban Members or Kick Members on their role stays exempt from the honeypot.
- Commands that require Administrator (
/antispam,/automod,/setlogs…) become unavailable to admins at night, unless a command rule lets them in.
The derogation role
Some staff need real power around the clock: the person on night watch, a co-owner abroad. /util derogation is made for them.
It creates a role named managed by iHorizon (in the server's language) with every permission except Administrator, then allows all those permissions on that role in every channel of the server. Since night mode only removes Administrator, the role goes through the night untouched. Run the command again at any time to resync it: it puts back the role's permissions and fixes the channels added or changed since.
iHorizon doesn't give the role to anyone: you hand it out like any Discord role.
This is real power, not a decoy
The derogation role is not a "fake admin" with only the look of power: its members can ban, kick, delete channels, manage roles and change the server, day and night. It's the hole you deliberately leave in night mode. Give it to as few people as possible, keep it below iHorizon's role, and keep Protection on: its holders are not on any trust list unless you put them there, so their destructive actions are still reverted and sanctioned.
The command requires Administrator, and iHorizon needs Manage Roles and Manage Channels (in practice Administrator: Discord doesn't let a bot hand out permissions it doesn't have).
Setting it up
- Put iHorizon's role at the very top of the role list, with Administrator.
- The server owner runs
/nightmode. In Configure night mode on the server.:- Configure night mode time range: start and end, typed as
23:00or2300; - Change timezone (UTC): pick your zone;
- Derank bots, and the trusted bots in the menu below;
- Warn server owner, to get the DMs;
- Enable night mode.
- Configure night mode time range: start and end, typed as
- Press the ✅ button to save. The panel also saves what you set when it expires after 30 minutes. It only saves its settings: a night that started or ended while the panel was open isn't undone.