← Back to Projects
Bot Discord Gaming Pattern Matching PHP Programming

WordleBot

A PHP Discord bot that parses shared Wordle results with pattern matching, tracks performance over time, and turns daily puzzle posts into lightweight community stats and achievements.

Illustrated WordleBot cover showing puzzle tiles, chat-style bot context, and achievement tracking motifs

WordleBot started with a simple question: could I parse Wordle posts from Discord and turn them into useful stats?

In one server I was in, people shared daily results in a consistent format. I already had a Raspberry Pi running with a database, PHP tooling in place, and some prior bot/integration experience, so this became a natural proof-of-concept project. Once it worked in one place, I connected it to a couple of servers and kept iterating.

The bot listens to specific channels and looks for the standard Wordle line format (game number plus score/X out of 6). When a message matches, it extracts and stores the puzzle number, solve result, and tile pattern for processing. Keeping this reliable mattered, because the whole project depends on accurately understanding what players already post naturally.

The first metric I tracked beyond average score was the count of days in a row a user posted their result: a streak. Players can earn streak achievements for 3, 7, 30, 50, 75, and 125 days in a row (and possibly beyond that, though I still have some to earn myself). Those streak milestones turned out to be a great motivator and helped keep people participating consistently.

From there, I added achievement logic based on pattern matching. For example, "Not Easy Being Green" is awarded when a puzzle is solved in five guesses using only green and gray tiles. That gave the tracker more personality than raw score and streak logging alone, and gave players more ways to earn wins while working toward longer streak goals.

One unexpectedly interesting challenge came when Wordle puzzle numbers crossed 1000. I had to account for the fact that different languages and locales represent thousand separators differently, which meant parser rules that seemed obvious at first needed to be more flexible than I expected.

My earliest logged puzzle is 703, and I am currently at 1771, so the bot has tracked 1,069 daily puzzles, about one month short of three years. Thanks to the tracker, I know I have played 937 of them, with an average score of 4.019 and a max streak of 150. My current streak is 15, so I have 135 games to go to match that run.

What started as a quick experiment has stayed around because it is fun and genuinely useful: a low-friction way to track scores, streaks, averages, and milestones over time, with a stats page that keeps everything visible outside chat scrollback.