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

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
- 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.
- 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.
- 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
Deep dives on Krypton
- PostgreSQL patterns for multi-process Discord bots3 min read
- Designing a Discord AutoMod: rules, strikes and escalation3 min read
- Discord bot reminders that fire exactly once, with natural time parsing3 min read
- A persistent jail for Discord moderation, and the bugs an audit found3 min read
- Sharding a discord.py bot across processes and servers5 min read
- How a Discord anti-nuke bot should decide who to punish5 min read
- Recovering a Discord server when the owner account is lost4 min read