Discord bot and HTTP API for querying the SFF PC Masterlist.
src/
config.js # Configuration (sheets, templates, bot settings)
engine/
index.js # QueryEngine - main entry point
sheets.js # Google Sheets fetching via googleapis
search.js # Fuzzysort-based search
formatter.js # Template rendering
bot/
index.js # Discord bot
commands/ # Slash commands (find, links, deploy)
api/
index.js # Express HTTP server
routes.js # API endpoints
npm install
cp .env.example .env
# Fill in .env with your credentials# Discord bot only
npm start
# HTTP API only
npm run api
# Both bot + API
npm run dev| Endpoint | Description |
|---|---|
GET /api/search?q=text&category=cases&limit=50 |
Search components |
GET /api/components/:category |
List all in category |
GET /api/categories |
List categories |
GET /api/health |
Stats and health check |
Edit src/config.js:
sheets.tabs- Which Google Sheets tabs to fetch and their categoriessheets.formatting- Display templates per categorybot.color- Embed colorbot.refreshIntervalMs- Data refresh interval
See .env.example for all required variables.