khari Docs
Security

Anti-nuke

Stop rogue staff and hacked accounts before they wreck your server.

Anti-nuke watches for anyone deleting, banning, kicking, or changing too much too fast, from Discord itself or through khari. Cross a limit and khari stops them right away: it bans, kicks, or strips their roles, and can put back what they deleted.

How it works

  • Each action (banning, kicking, deleting channels or roles, adding bots, making webhooks, and more) has a limit: how many times in how long.
  • The owner, khari itself, Whitelist 3 and 4, and whitelisted bots are never counted. Whitelist 2 gets double limits.
  • Commands like ,nuke that recreate a channel don't count as a delete.
  • With restore on, deleted channels and roles are made again, added bots are removed, and the vanity URL is put back.

Setting it up

Run ,antinuke to open the menu. Pick limits, the punishment, and whether to restore. You can also set one limit directly, like ,antinuke limit channel_delete 3 60 (3 deletes in 60 seconds).

Weakening anti-nuke (raising a limit or turning it off) waits 10 minutes before it applies, so a hacked account can't switch it off and nuke straight away. ,antinuke cancel stops a pending change.

Panic mode

Only the server owner can run ,panic. It pauses every whitelist level and every bot admin, so only the owner is trusted until ,panic lift.

Anti-nuke commands

,antinuke

Opens the anti-nuke panel: see and change every setting from a dropdown.

Also: ,an
,antinuke bots <"kick"|"ban">

Whether bots added during a nuke get kicked or banned (needs auto-restore on).

,antinuke cancel <change_id>

Cancels a change that's waiting to take effect.

,antinuke limit <"channel_delete"|"role_delete"|"ban"|"kick"|"timeout"|"dangerous_role"|"webhook_create"|"bot_add"|"vanity_change"> <count> <seconds>

Sets how many of an action someone can do within some seconds. 0 turns that check off.

,antinuke off

Turns anti-nuke off (after 10 minutes, unless the owner does it).

,antinuke on

Turns anti-nuke on.

,antinuke punishment <"ban"|"kick"|"strip">

What happens to someone who triggers it: ban, kick, or strip (only remove their roles).

,antinuke restore <"on"|"off">

Recreates deleted channels and roles, and removes added webhooks and bots, after a trigger.

,panic

Emergency: removes every whitelist level and pauses every bot admin and admin role, instantly.

,panic lift

Ends a panic: gives back the whitelist levels it removed and unpauses bot admins and admin roles.