Inspiration

Every moderator knows the dread of a spam raid. When a bot, troll, or compromised account floods a community, the cleanup is brutal: you open the user's profile and manually remove their posts and comments one at a time, page after page, while the toxic content stays live for everyone to see. It's slow, repetitive, and it hits hardest exactly when mods are already overwhelmed. We built Bot Purger to turn that 10-minute grind into a single click.

What it does

Bot Purger adds a "Purge User's Content" action directly into Reddit's native moderator menu on any post or comment. A mod confirms the target in a clean native form, chooses whether to remove the user's posts, comments, or both, and the app sweeps that user's entire history in the subreddit — removing everything that matches, automatically and in the background.

It also ships with Score Protection: set a score threshold and Bot Purger will automatically skip a user's genuinely popular posts, so a cleanup never accidentally nukes legitimate, high-engagement content.

How we built it

Bot Purger is built on the modern Devvit Web architecture — a serverless Hono server running on Node.js, written in fully type-safe TypeScript.

The core challenge was reliability at scale: a prolific account could have thousands of items, far more than a single serverless request can process before timing out. So instead of one giant loop, Bot Purger uses recursive, cursor-based chunking:

  • Each background run fetches one page of the user's history (newest first).
  • It saves its pagination cursor and remaining work queue to Redis.
  • It removes a small, safe batch, then uses the Devvit Scheduler to reschedule itself — picking up exactly where it left off.
  • This repeats until the purge is fully complete.

The result is a self-healing pipeline that finishes arbitrarily large purges dependably, without ever dropping requests or hitting execution limits.

Challenges we ran into

The hardest part was making the tool trustworthy at scale. Removing content in bulk is risky — a naive implementation could time out halfway, double-process items, or wipe out content a community actually values. We solved all three: Redis state guarantees the job resumes cleanly across runs, cursor-based paging avoids re-processing, and Score Protection guards high-value posts. We also kept everything audit-compliant by using standard remove () actions (never hard deletes), so every action shows up in the mod log and stays fully reversible.

Accomplishments that we're proud of

  • A genuinely net-new mod tool for the Devvit ecosystem with broad appeal.
  • A scale-safe background architecture that most quick hackathon scripts don't attempt.
  • A thoughtful safety feature (Score Protection) that shows we designed for real moderator needs, not just the happy path.
  • A clean, type-checked, lint-passing, zero-error build that's installable from the Developer Platform today.

What we learned

How to combine three Devvit primitives — the Scheduler, the Redis store, and the Reddit API — into a single reliable background-processing system, and how to design bulk moderation actions that are both powerful and safe to trust.

What's next for Bot Purger

  • A live progress view so mods can watch a purge complete in real time.
  • Optional auto-ban of the purged user in the same action.
  • A subreddit-wide allowlist to permanently protect specific accounts.

Live and installable now: https://developers.reddit.com/apps/bot-purger Source code: https://github.com/sekhsadyrahman-maker/bot-purger

Built With

Share this project:

Updates