SimBot Race Reports watches a list of iRacing drivers and posts a rich, image-based race card to Discord every time one of them finishes an official race or hosted session — podiums to their own channel, everyone else to the main feed.
Built to stay efficient toward iRacing's API while staying fast for active drivers.
Re-check frequency scales with how recently a driver raced: every 2 min if they raced in the last 3 days, stepping back to a 20-minute ceiling when dormant. Active drivers stay near-realtime; idle ones cost almost nothing.
Every fetched race is scanned for other tracked drivers in the same field — including across different Discord servers. One API call can surface reports for several drivers at once.
Each report is a rendered dark-themed card: finish position, iRating & Safety Rating deltas, incidents, class strength of field, weather, and more — built from a single API response.
Inline SVG charts for position over laps (class vs. overall), lap times with pit stops and incidents marked, gap to the cars ahead and behind, and class pace comparisons — all from one lap-chart call, no charting library.
Podiums are top-3 finish position within car class, not overall — correct for multiclass series where P8 overall can still be a class win.
Team results show the full roster sorted by iRating, with each driver's laps, iRating change, and Safety Rating change — real per-driver stats, not team placeholders.
Hosted sessions are checked on their own, sparser schedule (10 min for active drivers, backing off to daily), so league nights get race cards too without slowing official polling.
Pull up any driver's profile card (licenses, career stats, Driver DNA), a tracked driver's race history, a report for any past race, or a team report comparing every teammate's pace and stints.
An "all races" channel and a "podiums only" channel can both be set at once — every race goes to one, podium finishes also go to the other.
Every post is claimed in a dedup table before sending. A crash or restart mid-poll can never result in the same race being posted twice.
Every server the bot joins or leaves, and every slash command run, is logged for analytics and debugging — matching the rest of the SimBot suite.
Every race result, lap chart, and recent-races response is cached verbatim in the database — a foundation for future stats without re-hitting the iRacing API.
If image rendering ever fails, the report still posts as a Discord embed — a report is never dropped for a rendering hiccup.
Commands labeled Admin Only require the Manage Server permission. Parameters marked ? are optional.
From server setup to a race card landing in Discord.
An admin runs /racereports-admin setup to pick an all-races channel and/or a podiums-only channel. The bot verifies it can actually post there before saving.
A user runs /racereports track with their iRacing customer ID. Their watermark is seeded to their most recent existing race — no history spam, only new races going forward.
A lightweight tick checks which drivers are due, based on their adaptive cadence. Due drivers are queried once via member_recent_races through a shared rate limiter.
Any subsession newer than the stored watermark triggers a full results/get fetch — this single response carries weather, splits, standings, and per-driver stats for the card.
A lap-chart call feeds the position and lap-time charts, then the whole card is rendered to an image. If rendering fails for any reason, an embed is posted instead — nothing is dropped.
The report is posted to every server that tracks the driver — all-races channel always, podium channel if it's a top-3-in-class finish — with a dedup claim guaranteeing no double-posts.
A single long-running Node process — no webhooks required, since iRacing doesn't offer any.
A persistent discord.js WebSocket connection handles slash commands and posts reports — no HTTP interactions endpoint to host.
OAuth2 Password Limited Grant, with access tokens cached in Redis and refreshed automatically. All calls run through one queue (about 50 calls/min), coordinated through Redis so the website and other SimBot bots on the same account share the limit.
Drivers, per-guild config, subscriptions, dedup log, guild/interaction analytics, and raw API archives — all in parameterized queries, no ORM.
A separate Express process serves a browser UI for searching drivers and opening full race reports, sharing the bot's MySQL, Redis, and iRacing client.
The race card is a Handlebars template rendered to PNG via headless Chromium, with charts drawn as plain inline SVG.
SimBot Race Reports is hosted for you. There's nothing to install: invite the bot, pick your channels, and start tracking drivers.
You need the Manage Server permission. The bot asks for View Channel, Send Messages, Embed Links, and Attach Files (race cards post as images).
Add to DiscordRun /racereports-admin setup to choose an all-races channel and/or a podiums-only channel. The bot checks it can post there before saving.
Each driver runs /racereports track with their iRacing customer ID, or an admin adds them with /racereports-admin add-driver. Only races from then on are posted.
Run /racereports-admin status to confirm channels and permissions, or /racereports-admin test to post a driver's latest race right away.