Game Hunt Bot 🎮

Serverless bot that automatically monitors free game giveaways on popular platforms like **Epic Games**, **Steam**, and **PlayStation Plus**. It's designed to run on a schedule, check for new freebies, and send timely, well-formatted notifications to a Telegram channel, ensuring you never miss a deal.
Repository

Features

✔Multi-Platform Monitoring: Tracks free games on Epic Games, Steam, and PlayStation Plus (both Monthly and Catalog games).
✔Telegram Notifications: Sends clean, formatted messages to a specified Telegram channel for new game announcements.
✔Manual Trigger: Ability to start a game check instantly via a `/check` command in Telegram (admin only).
✔Persistent Storage: Utilizes Upstash (Redis) for persistent storage in production and a local JSON file for development, preventing duplicate notifications.
✔Serverless Deployment: Built to run as a cost-effective serverless function on platforms like Vercel.
✔Scheduled Checks: Uses cron jobs (configured in `vercel.json`) to automate periodic checks for new giveaways.
✔Highly Configurable: Easily enable or disable platform modules and tweak bot behavior through a central settings file.

Technologies Used

JavaScript
Node.js
Vercel
Upstash
Axios

Project Structure

game-hunt/
├── 📁 api/                   # Vercel Serverless Function entry point
│   ├── 📄 check-games.js     # Main handler for checking games (cron)
│   └── 📄 webhook.js         # Handler for Telegram commands (e.g., /check)
├── 📁 config/                 # Configuration files
│   └── 📄 settings.js        # Module toggles and bot settings
├── 📁 data/                  # Local data storage for development
│   └── 📄 games.json         # Stores current and previous game lists
├── 📁 lib/                   # Core logic modules
│   ├── 📄 epic-games.js      # Logic for fetching Epic Games data
│   ├── 📄 steam.js           # Logic for fetching Steam data
│   ├── 📄 ps-plus.js         # Logic for fetching PlayStation Plus data
│   ├── 📄 storage.js        # Handles reading/writing to KV or local JSON
│   ├── 📄 kv.js              # Upstash Redis client configuration
│   └── 📄 telegram.js       # Handles sending messages to Telegram
├── 📄 test-all.js            # Comprehensive local test script
├── 📄 .env.example           # Example environment variables
├── 📄 vercel.json             # Vercel deployment and cron job configuration
└── 📄 package.json            # Project dependencies and scripts