How mymaswayvpn/genshin-checkin works
This repository automates Genshin Impact daily check-ins and promo-code redemption for accounts supplied through GitHub secrets. The main workflows are scheduled check-in with result logging and Telegram reporting, scheduled promo-code discovery followed by redemption, and manual redemption of selected or saved active codes. Shared HoYoLab services handle account loading, role lookup, token verification, redemption, and notifications. Source excerpts show these runtime calls; GitHub secret cleanup and workflow scheduling are documented capabilities, but their implementation wiring was not sampled.
Main entry points: promo-codes.js Promo monitor · daily-checkin.js Daily check-in · redeem-codes.js Manual redeem · hoyolab-api.js Role lookup
Components 16
Account workflows
- Daily check-in
scripts/daily-checkin.js - Manual redeem
scripts/redeem-codes.js
Game services
- Account loading
scripts/hoyolab-api.js - Role lookup
scripts/hoyolab-api.js - Token verification
scripts/hoyolab-api.js - Code redemption
scripts/hoyolab-api.js - Telegram reporting
scripts/hoyolab-api.js - User-Agent rotation
scripts/user-agents.js - Expired-secret cleanup
scripts/hoyolab-api.js
Promo discovery
- Promo monitor
scripts/promo-codes.js
Persistent state
- Check-in log
log.txt - Promo-code database
promo-codes.json
Other components
- GitHub Actions
- HoYoverse APIs
- Promo sources
- GitHub secrets
Connections 30
- GitHub Actions → Daily check-in: runs daily
README.md - GitHub Actions → Promo monitor: runs periodically
README.md - GitHub Actions → Manual redeem: dispatches
README.md - Daily check-in → Account loading: loads accounts
scripts/daily-checkin.js - Daily check-in → Check-in log: writes results
scripts/daily-checkin.js - Daily check-in → Telegram reporting: sends report
scripts/daily-checkin.js - Daily check-in → HoYoverse APIs: checks in
scripts/daily-checkin.js - Daily check-in → Expired-secret cleanup: cleans expired accounts
README.md - Manual redeem → Account loading: loads accounts
scripts/redeem-codes.js - Manual redeem → Token verification: verifies token
scripts/redeem-codes.js - Manual redeem → Role lookup: finds roles
scripts/redeem-codes.js - Manual redeem → Code redemption: redeems codes
scripts/redeem-codes.js - Manual redeem → Promo-code database: reads active codes
scripts/redeem-codes.js - Manual redeem → Telegram reporting: sends report
scripts/redeem-codes.js - Promo monitor → Promo sources: fetches promo pages
scripts/promo-codes.js - Promo monitor → Account loading: loads accounts
scripts/promo-codes.js - Promo monitor → Role lookup: finds roles
scripts/promo-codes.js - Promo monitor → Code redemption: redeems new codes
scripts/promo-codes.js - Promo monitor → Promo-code database: reads and updates
scripts/promo-codes.js - Promo monitor → Telegram reporting: sends report
scripts/promo-codes.js - Account loading → GitHub secrets: reads credentials
README.md - Expired-secret cleanup → GitHub secrets: updates secrets
README.md - Role lookup → HoYoverse APIs: queries roles
- Token verification → HoYoverse APIs: validates token
- Code redemption → HoYoverse APIs: submits codes
- Telegram reporting → HoYoverse APIs: sends messages
- Daily check-in → User-Agent rotation: rotates requests
README.md - Role lookup → User-Agent rotation: rotates requests
scripts/hoyolab-api.js - Code redemption → User-Agent rotation: rotates requests
scripts/hoyolab-api.js - Promo monitor → User-Agent rotation: rotates requests
scripts/promo-codes.js