Taught the bot to be a film nerd. Built a complete Film Club feature suite for Jefebot across Discord and Twitch. Parsed a 1,021-film markdown watchlist into a searchable database, enriched every entry with OMDB and IMDB metadata, and shipped six new commands — all with dual-platform support.
Parsing the Watchlist
The source is a markdown table ("The Rory Gilmore Film Club") with 1,021 films in rows containing title links, dates, and notes. A new filmClubService parses this into structured objects with title, year, URL, IMDB ID, and watch date. Many entries had no recorded date, so we added linear date interpolation between dated entries — assigning estimated dates with a dateEstimated flag so the UI can show "~03/15/2024" for interpolated entries instead of claiming they're unwatched.
Search Matching: Three Iterations
Fuzzy title search went through three rewrites. The first version used simple substring matching, which led to "dudes" matching "Casa de mi Padre" because "dudes".includes("de"). Version two added a 3-character minimum for substring matches, but "the" still matched "Theater Camp" via startsWith. The final version uses word boundary helpers (_startsWithPhrase, _containsPhrase) requiring exact word matches or 4+ character prefix matching. Clean results, no false positives.
OMDB + IMDB Metadata Hydration
We integrated the OMDB API for film metadata — genre, director, cast, ratings, poster, plot, runtime, and box office. The free tier caps at 1,000 requests/day, so we built a resumable hydration pipeline: hydrate_films.js saves checkpoints every 50 entries and stops gracefully at 950 fetches to leave headroom for ad-hoc lookups. After OMDB hit its daily limit at 986 entries, we wrote an IMDB scraper that extracts JSON-LD structured data from IMDB title pages, picked up the remaining 35 films plus the 4 OMDB failures (films too new or with alternate titles). A third pass created title-key aliases for 23 films linked to Wikipedia/Rotten Tomatoes instead of IMDB. Final result: 1,021/1,021 films with full metadata.
Six New Commands
!filmclub | Search by title or metadata field (actor, director, genre, etc.). Shows stats, ratings, posters in Discord embeds |
!filminfo | Live OMDB lookup for any movie, not just watchlist entries. Shows if it's on the list |
!filmtonight | Set/view/clear tonight's feature film with automatic OMDB enrichment |
!filmrequest | Request a film for the queue. Exact-match duplicate checking against both watchlist and queue |
!filmqueue | View, search, or manage the request queue |
!trivia via spam | Spam scheduler can now trigger interactive trivia sessions when personality is set to 'trivia' |
All commands work on both Discord (rich embeds with posters) and Twitch (text format). Metadata search results dynamically fill to their platform's character limit instead of a fixed count.
Spam Scheduler Trivia Integration
The spam scheduler's personality system now supports a trivia mode. When a schedule fires with this personality, it starts a real interactive trivia session instead of generating AI chat. The topic field maps to trivia category, and the existing answer-checking pipelines in both Discord's messageCreate handler and Twitch's chat service handle responses automatically. If trivia is already active in the channel, the cycle silently skips. Random personality mode won't accidentally pick trivia since it's not in the MODE enum.
What's Next
- Run
hydrate_films.jsafter OMDB resets if we want to cross-verify IMDB-scraped entries with OMDB data - Potential Google Drive integration to auto-pull watchlist updates
- Film voting system for queue prioritization