Inspiration

Many Reddit communities deal with reposts every day. Classic bots like u/DuplicateDestroyer helped moderators catch repeated links and similar posts, but older bots usually require external hosting, bot accounts, API credentials, and ongoing maintenance. I wanted to bring that workflow into Devvit so moderators can install repost detection directly from Reddit’s app platform.

What it does

Duplicate Destroyer Devvit checks new subreddit posts against a rolling index of recent posts. It detects exact duplicate URLs, URLs with tracking parameters, Reddit-internal crosspost-style links, and similar titles. High-confidence duplicates can be removed automatically with a flair and optional removal comment. Medium-confidence matches are reported to the mod queue for human review.

How we built it

The app is built with Devvit, TypeScript, Reddit APIs, Devvit triggers, scheduler jobs, and Devvit KV Store. The PostSubmit trigger builds a compact post record, loads recent posts from KV Store, runs duplicate checks, applies moderator actions when thresholds are met, and logs action metadata for a weekly digest.

Title similarity is implemented with a from-scratch Levenshtein distance function, with no external npm similarity library.

Challenges we ran into

Devvit app names have a short slug limit, so the deployed app uses the slug dupe-destroyer. Reddit report reasons also have a 100-character limit, so report messages had to be compact. Text posts required special handling because external URLs can appear in the post body rather than the post URL field.

Accomplishments that we're proud of

The app ports a proven moderation workflow into a Devvit-native installable tool. It supports both automatic enforcement and human-in-the-loop review. It also works without external servers, paid APIs, PRAW hosting, or extra infrastructure.

What we learned

We learned how to use Devvit PostSubmit triggers, KV Store indexing, scheduler jobs, app settings, Reddit moderation APIs, and Devvit app media assets. We also learned several platform constraints around report reason length, app slug length, and how Reddit represents self posts versus link posts.

What's next for Duplicate Destroyer Devvit

Next steps include better digest controls, moderator menu actions for manual index reset, richer reporting analytics, whitelist settings for approved domains, and image-aware duplicate detection if Devvit exposes suitable media hashing or comparison APIs in the future.

Built With

Share this project:

Updates