TC-Bot

TC-Bot is a Discord companion for Ark of War theorycrafting: slash commands that answer “what does this gear look like at +50?” and “what does healing actually cost for this troop row?” without leaving the server. It was built for the Diplomacy of War community and sticks to a small, well-tested surface area - calculators, sheet-backed lookups, mopup timing, and operational metrics - not a second client for the game.

The bot is TypeScript on Discord.js (strict mode), with commands discovered from the filesystem, optional legacy `!tcmu` message handling, and a Google Sheets integration for the Theorycrafters workbook where troop stats and costs live. Production startup expects valid Discord credentials, spreadsheet IDs, and a readable client_secret.json; healing and iTS flows consume cached sheet rows, while gear check uses in-repo breakpoints and mopup uses schedule logic that does not read troop tables.

Runtime expectations are modest: Node.js 25+, pnpm 11+, a SQLite file for usage metrics, and whatever process manager you prefer (PM2 is supported out of the repo). CI runs lint, format checks, typechecking, and Vitest so refactors do not quietly rot the calculators everyone relies on.

Think of TC-Bot as the spreadsheet’s polite cousin: same numbers, fewer tabs, and an embed when the next mopup window opens.