Skip to content

Discord security bot

Krypton

Real-time anti-nuke, AutoMod and moderation for Discord servers.

Role
Creator and lead developer
Status
Live
Platforms
Discord
Built with
Python, discord.py, PostgreSQL
The kryptonbot.in landing page: Krypton, the Discord security bot that protects your server
The kryptonbot.in landing page: Krypton, the Discord security bot that protects your server

Overview

A Discord security and moderation bot. Anti-nuke that attributes every destructive action to the right person and reverses it, AutoMod with per-rule actions, and backup-owner codes for server recovery.

What it does

Anti-nuke that blames the right person

Audit-log entries are matched to the event's target and claimed once, so a different moderator is never punished. Deleted and edited channels are restored, and punishments strip every dangerous permission.

Trust you can reason about

One trust check for every module: the bot, the server owner, extra owners, per-module whitelists, then whitelisted roles. Whitelist changes apply immediately.

Backup Owner codes

The server owner issues a one-time code. Whoever redeems it is treated as owner for commands, permissions and anti-nuke trust, only while the issuing owner still owns the server.

AutoMod with real actions

Per-rule actions and durations for flood, links, invites and text filters such as zalgo, newlines and blocked words. The premium edition, Krypton Prime, adds advanced filters and scam detection.

Everything a server runs on

Moderation and jail, giveaways, welcome messages, reminders, embeds, auto and voice roles, AFK, games and music.

How it's built

  1. 01

    Sharded and clustered

    A shard manager reads Discord's recommended shard count, splits it into clusters and supervises each process. Clusters are deployed across several VPS hosts with PM2.

  2. 02

    Fails safe

    Guild settings load in one query and are cached per guild. If the database is down, the last known settings keep protecting the server, and every query has a timeout.

  3. 03

    Built to survive a raid

    Events that arrive together share one audit-log read, so a mass deletion costs a couple of API calls instead of one per channel, leaving rate limit for the reversal.

Stack

  • Python
  • discord.py
  • PostgreSQL
  • asyncpg
  • Redis
  • PM2
  • Linux VPS