An automated daily check-in service for Bahamut built with Cloudflare Worker + Hono + TypeScript.
- 🔐 Automatic daily check-in for Bahamut main site
- 🏛️ Automatic guild check-in
- 📺 Ad double reward (廣告雙倍獎勵)
- 📱 Two-factor authentication (2FA) support
- 🤖 Telegram Bot notifications
- ⏰ Scheduled execution (Daily at UTC 00:00 / Taiwan Time 08:00) with retry at 10:00 and 12:00
- 🔄 KV-based deduplication to skip retries if already signed in
Note: Ani Gamer quiz (
needAnswer) is disabled.ani.gamer.com.twis protected by Cloudflare and returns 403 for requests originating from Cloudflare Worker IP ranges. Use a local script (Surge, Node.js, NAS) for quiz answering instead.
cd worker/bahamut-daily-bonus
npm install# Required: Bahamut username
wrangler secret put BAHAMUT_UID
# Required: Bahamut password
wrangler secret put BAHAMUT_PWD
# Optional: 2FA Token (16 digits)
wrangler secret put BAHAMUT_TOTP
# Optional: Telegram Bot Token
wrangler secret put TELEGRAM_BOT_TOKEN
# Optional: Telegram Chat ID
wrangler secret put TELEGRAM_CHAT_IDnpm run deployReturns service information and available endpoints
Health check endpoint
Manually trigger the sign-in process
- Get a Bot Token from @BotFather
- Get your Chat ID (send a message to @userinfobot)
- Configure environment variables using
wrangler secret
# Local development
npm run dev
# View logs
npm run tail
# Test manually
curl -X POST http://localhost:8787/trigger- Uses Mobile API for login with automatic web session establishment
- Supports both mobile and web authentication tokens
- Automatically handles cross-domain cookie sharing for Ani Gamer
This Worker uses several strategies to minimize CPU time while maintaining natural behavior:
- Smart Delays: Implements short, randomized delays (500-2000ms) to simulate human behavior without excessive CPU usage
- Simplified Architecture: No KV storage needed - relies on Bahamut API responses
- Automatic Deduplication: Bahamut API handles duplicate sign-in attempts gracefully
- Session Management: Automatically establishes web sessions when needed for cross-service compatibility
- Ensure your account credentials are correct
- If 2FA is enabled, provide the 16-digit TOTP secret
- Recommended to set up Telegram notifications for real-time status updates
- Ad reward adds ~30 seconds wall-clock time (idle wait, not CPU time)
- KV namespace must be created before deploying:
npx wrangler kv namespace create "DAILY_STATUS"
MIT