Skip to content
← All work
TypeScriptReactPostgreSQLDiscordDocker

discord-stonker-bot

A self-hosted Discord bot for safety, moderation and automation, set up per server from a browser control panel.

The problem

Busy Discord communities need anti-raid, impersonation and scam alerts, moderation tools, scheduled posts and feeds all at once. Single-purpose bots each cover a slice, so server owners juggle several bots with overlapping permissions and settings, and most of them ask Discord for far more access than they use.

What I built

Stonker Bot for Discord, one bot with 19 features across safety, moderation, automation, community and RSS feeds. Each feature has its own settings page and its own switch for each server, and features you leave off don't run. A control panel in the browser handles setup, live logs, backups, team accounts with Owner, Administrator, Operator and Viewer roles, and alerts when the bot can't sign in or drops off Discord.

How it works

It's TypeScript in a single Docker container, with the Discord connection, the React control panel, a background worker and an embedded PostgreSQL database each supervised on their own by s6-overlay. The bot asks Discord only for the Gateway intents its enabled features need, secrets like the bot token are stored encrypted, and stopping or restarting the bot leaves the panel and database running.

The outcome

A multi-architecture image on Docker Hub and GHCR where one installation can serve several servers, and older setups come over by importing their config.json from the Backup page.

This bot started in 2021 for finance-related Discord servers. Version 1.0 logged nickname changes and edited or deleted messages, sent scheduled posts, auto-replied to matching messages, and banned joins with known scammer names or avatars. It kept growing through the 3.x releases until everything lived in one big config.json with 22 sections.

In 2026 I rewrote it from the ground up as a Docker appliance for any kind of community. The finance pieces and the Twitter feeds are gone, prefix commands became slash commands, and that giant config file turned into a control panel where each feature gets set up and switched on per server.

What I like most about the new version is how little it asks for. Anti-Raid, Impersonator Alerts and the rest only register when you turn them on, so a server running two features doesn’t hand the bot access to data it will never use.