From 64352fa306bebc689f0182161fe4a33c5458f1df Mon Sep 17 00:00:00 2001 From: LightZirconite Date: Sat, 6 Dec 2025 13:13:20 +0100 Subject: [PATCH] Refactor documentation and add new features - Updated index.md to simplify structure and focus on task-oriented guides. - Revised notifications.md to streamline setup instructions and improve clarity. - Added report-error.js for structured error reporting to Discord. - Introduced account-creation.md and configuration.md for detailed guidance on account setup and bot configuration. - Created dashboard.md, docker.md, error-reporting.md, modes.md, running.md, scheduling.md, setup.md, troubleshooting.md, and update.md for comprehensive documentation on respective features and usage. - Updated package-lock.json and package.json to include peer dependencies. --- README.md | 553 +------------- api/report-error.js | 119 +++ docs/account-creation.md | 14 + docs/accounts.md | 188 ----- docs/build-system.md | 288 ------- docs/commands.md | 389 ---------- docs/configuration.md | 23 + docs/dashboard.md | 14 + docs/docker-deployment.md | 482 ------------ docs/docker.md | 14 + docs/error-reporting.md | 16 + docs/getting-started.md | 1512 ------------------------------------- docs/index.md | 231 +----- docs/modes.md | 16 + docs/notifications.md | 363 +-------- docs/running.md | 16 + docs/scheduling.md | 19 + docs/setup.md | 22 + docs/troubleshooting.md | 18 + docs/update.md | 14 + package-lock.json | 6 + package.json | 2 +- 22 files changed, 377 insertions(+), 3942 deletions(-) create mode 100644 api/report-error.js create mode 100644 docs/account-creation.md delete mode 100644 docs/accounts.md delete mode 100644 docs/build-system.md delete mode 100644 docs/commands.md create mode 100644 docs/configuration.md create mode 100644 docs/dashboard.md delete mode 100644 docs/docker-deployment.md create mode 100644 docs/docker.md create mode 100644 docs/error-reporting.md delete mode 100644 docs/getting-started.md create mode 100644 docs/modes.md create mode 100644 docs/running.md create mode 100644 docs/scheduling.md create mode 100644 docs/setup.md create mode 100644 docs/troubleshooting.md create mode 100644 docs/update.md diff --git a/README.md b/README.md index 7f656e5..d572a4f 100644 --- a/README.md +++ b/README.md @@ -1,516 +1,41 @@ -
- - - # Microsoft Rewards Bot -## โš ๏ธ ACCOUNT CREATION MODE DETECTED โš ๏ธ - -**Automate your Microsoft Rewards points collection** - -[![Discord](https://img.shields.io/badge/๐Ÿ’ฌ_Discord-7289DA?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/k5uHkx9mne) -[![GitHub](https://img.shields.io/badge/โญ_Star-yellow?style=for-the-badge&logo=github&logoColor=black)](https://github.com/LightZirconite/Microsoft-Rewards-Bot) -[![Version](https://img.shields.io/badge/v2.60.1-blue?style=for-the-badge)](https://github.com/LightZirconite/Microsoft-Rewards-Bot/releases) - -
- ---- - -## ๐Ÿ’ก What is this? - -A **TypeScript bot** that automatically earns Microsoft Rewards points by completing: - -- ๐Ÿ” Desktop & mobile Bing searches -- ๐Ÿ“‹ Daily quizzes, polls, and activities -- ๐ŸŽ Promotional offers and punch cards -- ๐Ÿ“š Read-to-earn tasks - -**Built with anti-detection** to work safely and reliably. - ---- - -## โœจ Features - -- ๐Ÿค– **Human-like behavior** โ€” Natural search patterns -- โฐ **Auto-scheduling** โ€” Set it and forget it -- ๏ฟฝ **Multi-account support** โ€” Manage multiple accounts -- ๐Ÿ”” **Notifications** โ€” Discord webhooks & mobile alerts -- ๐Ÿณ **Docker ready** โ€” Easy containerized deployment -- ๐ŸŒ **Proxy support** โ€” Enhanced privacy (optional) - ---- - -## ๐Ÿš€ Quick Start - -### Prerequisites - -- **Node.js 20+** (v22 recommended) โ€” [Download](https://nodejs.org/) -- **Microsoft account(s)** with email + password - -### Installation - -```bash -# 1. Download the project -git clone https://github.com/LightZirconite/Microsoft-Rewards-Bot.git -cd Microsoft-Rewards-Bot - -# 2. Start the bot (does EVERYTHING automatically!) -npm start -``` - -**That's literally it!** ๐ŸŽ‰ - -The `npm start` command will automatically: -- โœ… Install dependencies if needed -- โœ… Install Chromium browser if needed -- โœ… Build TypeScript if needed -- โœ… Launch the bot - -On first run, you'll be prompted to configure your accounts interactively. - ---- - -## ๐ŸŽฎ Essential Commands - -### **๐Ÿš€ Main Command** - -```bash -npm start -``` -**The ONLY command you need!** Automatically handles: -- ๐Ÿ“ฆ Dependencies installation (if missing) -- ๐ŸŒ Browser installation (if missing) -- ๐Ÿ”จ TypeScript compilation (if missing) -- โ–ถ๏ธ Bot execution - -### **๐Ÿ”ง Optional Commands** - -| Command | Use When | -|---------|----------| -| `npm run build` | Force rebuild TypeScript | -| `npm run clean` | Clean build artifacts before rebuild | -| `npm run dev` | Development mode (hot reload) | -| `npm run creator` | Create new Microsoft accounts | -| `npm run dashboard` | Start web dashboard on port 3000 | -| `npm test` | Run test suite | - -**๐Ÿ’ก Pro Tip:** For 99% of use cases, just use `npm start` โ€” it's smart enough to figure out what needs to be done! - -**๐Ÿ“– [Complete Commands Reference โ†’](docs/commands.md)** - ---- - -## ๐Ÿ”„ Typical Workflows - -### **First-Time Setup** (New User) -```bash -# Just run this - it does EVERYTHING! -npm start -``` - -On first run: -1. โœ… Installs all dependencies automatically -2. โœ… Installs Chromium browser automatically -3. โœ… Builds the TypeScript project automatically -4. โœ… Prompts you to configure accounts -5. โœ… Starts earning points! - -### **Daily Usage** (Regular User) -```bash -# Same command - but skips already-done steps! -npm start -``` - -### **After Git Pull** (Updating) -```bash -# Just this - it checks and updates what's needed -npm start -``` - -### **Creating New Accounts** -```bash -# Interactive mode -npm run creator - -# Quick mode with referral -npm run creator -- -y backup@gmail.com "https://rewards.bing.com/welcome?rh=CODE&ref=..." -``` - -### **Troubleshooting** (Issues) -```bash -# Clean rebuild -npm run clean -npm start - -# Full reset (nuclear option) -rm -rf node_modules dist .playwright-chromium-installed -npm start -``` - -### **Monitoring** -```bash -npm run dashboard -# Open http://localhost:3000 -``` - ---- - -### ๐Ÿ“– Need Help? - -**First time using the bot?** โ†’ [๐Ÿ“˜ Getting Started Guide](docs/getting-started.md) - -The complete guide covers: -- โœ… Detailed installation steps -- โœ… Creating Microsoft accounts with referrals (+7,500 points/month!) -- โœ… Setting up 2FA authentication -- โœ… Configuration options -- โœ… Troubleshooting common issues - ---- - -## ๐Ÿ“š Documentation - -**New to the bot?** Start here: **[๐Ÿ“˜ Getting Started Guide](docs/getting-started.md)** - -**Need specific info?** Check the **[๐Ÿ“– Documentation Hub](docs/index.md)** - -
-๐Ÿ“‘ Quick Links - -| Guide | Description | -|-------|-------------| -| **[Getting Started](docs/getting-started.md)** | Complete installation tutorial | -| **[Accounts & 2FA](docs/accounts.md)** | Setup accounts with authentication | -| **[Configuration](docs/config.md)** | Customize bot behavior | -| **[Scheduling](docs/schedule.md)** | Automate with cron/Task Scheduler | -| **[Notifications](docs/notifications.md)** | Discord & mobile alerts | -| **[Troubleshooting](docs/troubleshooting.md)** | Fix common issues | - -
- ---- - -## ๐Ÿ“Š Dashboard (BETA) - -Monitor and control your bot through a local web interface: - -```bash -# Start dashboard separately -npm run dashboard - -# Or enable auto-start in config.jsonc: -{ - "dashboard": { - "enabled": true, - "port": 3000 - } -} -``` - -Access at `http://localhost:3000` to: -- ๐Ÿ“ˆ View real-time points and account status -- ๐Ÿ“‹ Monitor live logs with WebSocket streaming -- ๐Ÿ”„ Manually sync individual accounts -- โš™๏ธ Edit configuration with automatic backup -- ๐Ÿ“Š View historical run summaries and metrics - -**[๐Ÿ“– Full Dashboard API Documentation](src/dashboard/README.md)** - ---- - -## ๐Ÿ†• Account Creator (BETA) - -Automatically create new Microsoft accounts with advanced security features: - -```bash -# Interactive mode (asks everything) -npm run creator - -# With auto-accept and recovery email (copy-paste URL directly from Microsoft) -npm run creator -- -y backup@gmail.com "https://rewards.bing.com/welcome?rh=YOUR_CODE" -``` - -**โœจ Features:** -- ๐ŸŽฏ **Language-independent** โ€” Works in any language -- ๐Ÿ” **Strong passwords** โ€” Automatically generated (12-16 chars) -- ๐Ÿ“ง **Realistic emails** โ€” 200+ name database for natural-looking addresses -- ๐ŸŽ‚ **Natural birthdates** โ€” Random age 18-50 years old -- ๐Ÿ›ก๏ธ **Recovery email** โ€” Optional backup email for account recovery -- ๐Ÿ”’ **2FA support** โ€” TOTP authentication with Google Authenticator -- ๐Ÿ”‘ **TOTP secrets** โ€” Extracts and saves secret keys -- ๐Ÿ’พ **Complete backups** โ€” Saves all details including recovery codes -- ๐Ÿค– **CAPTCHA support** โ€” Manual solving (human verification) -- ๏ฟฝ **Organized storage** โ€” Individual files per account - -**๐ŸŽ›๏ธ Command Arguments (SIMPLIFIED!):** -- `` โ€” Referral URL (auto-detected if starts with http) -- `` โ€” Recovery email (auto-detected if contains @) -- `-y` โ€” Auto-accept mode (enables recovery + 2FA automatically) - -**That's it! No more confusing flags.** ๐ŸŽ‰ - -**โš™๏ธ How It Works:** - -| Command | Recovery Email | 2FA | Notes | -|---------|---------------|-----|-------| -| `npm run creator` | โ“ Prompts | โ“ Prompts | Interactive mode | -| `npm run creator -- -y` | โœ… Prompts for email | โœ… Enabled | Auto-accept all | -| `npm run creator -- -y backup@gmail.com` | โœ… Uses provided email | โœ… Enabled | Full automation | -| `npm run creator -- -y URL` | โœ… Prompts for email | โœ… Enabled | With referral | -| `npm run creator -- -y backup@gmail.com URL` | โœ… Uses provided email | โœ… Enabled | Complete setup | - -**๐Ÿ“‹ What happens:** -1. Creates Microsoft account (email, password, birthdate, names) -2. Enrolls in Microsoft Rewards (if referral URL provided) -3. **[Optional]** Adds recovery email with verification -4. **[Optional]** Sets up 2FA with TOTP (Google Authenticator compatible) -5. Extracts and saves TOTP secret key and recovery code -6. Saves complete account info to `accounts-created/` directory - -**๐Ÿ” Saved Information:** -- Email and password -- Full name and birthdate -- Referral URL (if used) -- Recovery email (if added) -- TOTP secret key (for authenticator apps) -- 5-part recovery code (emergency access) - -**[๐Ÿ“– Full Account Creator Guide](src/account-creation/README.md)** - ---- - -## โฐ Automatic Scheduling - -Configure automatic task scheduling directly from `config.jsonc` - **perfect for Raspberry Pi!** - -```jsonc -{ - "scheduling": { - "enabled": true, // Just set this to true - "type": "auto", // Automatically detects Windows/Linux/Raspberry Pi - "cron": { - "schedule": "0 9 * * *" // Raspberry Pi/Linux: Daily at 9 AM - }, - "taskScheduler": { - "schedule": "09:00" // Windows: Daily at 9:00 - } - } -} -``` - -**Then simply run:** -```bash -npm start -``` - -The bot will automatically configure cron (Linux/Raspberry Pi) or Task Scheduler (Windows) for you! - -**[๐Ÿ“– Full Scheduling Documentation](docs/schedule.md)** - ---- - -## ๐Ÿณ Docker Quick Start - -For containerized deployment with built-in scheduling: - -```bash -# Ensure accounts.jsonc and config.jsonc exist in src/ -npm run docker:compose - -# Or use docker compose directly -docker compose -f docker/compose.yaml up -d - -# View logs -docker logs -f microsoft-rewards-bot - -# Check status -docker compose -f docker/compose.yaml ps -``` - -Container includes: -- โœ… Built-in cron scheduling -- โœ… Automatic timezone handling -- โœ… Random execution delays (anti-detection) -- โœ… Health checks - -**๐Ÿ“– [Complete Docker Guide โ†’](docs/docker-deployment.md)** - ---- - -## โš™๏ธ Configuration Highlights - -The script works great with default settings, but you can customize everything in `src/config.jsonc`: - -```jsonc -{ - "search": { - "useLocalQueries": false, // Prioritize Google Trends API (recommended) - "settings": { - "useGeoLocaleQueries": true // Use account country for searches (FR, DE, JP, etc.) - } - }, - "queryDiversity": { - "enabled": true, // Mix multiple search sources - "sources": ["google-trends", "reddit", "local-fallback"] - }, - "humanization": { - "enabled": true, // Enable natural behavior patterns - "stopOnBan": true // Stop on ban detection - }, - "workers": { - "doDesktopSearch": true, // Desktop Bing searches - "doMobileSearch": true, // Mobile Bing searches - "doDailySet": true, // Daily tasks and quizzes - "doMorePromotions": true, // Promotional offers - "doPunchCards": true // Multi-day challenges - }, - "execution": { - "clusters": 1, // Parallel account processing - "runOnZeroPoints": false // Skip when no points available - } -} -``` - -**๐Ÿ“– [Complete Configuration Guide](docs/config.md)** - ---- - -## ๐ŸŽฏ What Gets Automated - -The script automatically completes: - -- โœ… **Desktop Searches** โ€” 30+ searches on Bing (desktop user-agent) -- โœ… **Mobile Searches** โ€” 20+ searches on Bing (mobile user-agent) -- โœ… **Daily Set** โ€” Quizzes, polls, and daily activities -- โœ… **More Activities** โ€” Promotional tasks and special offers -- โœ… **Punch Cards** โ€” Multi-day challenges and bonus tasks -- โœ… **Daily Check-in** โ€” Simple check-in for bonus points -- โœ… **Read to Earn** โ€” Article reading tasks - -All while maintaining **natural behavior patterns** to minimize detection risk. - ---- - -## ๐Ÿ’ก Usage Tips - -- **Run regularly:** Use cron, systemd timers, or Windows Task Scheduler (see docs) -- **Use humanization:** Always keep `humanization.enabled: true` for safety -- **Monitor logs:** Check for ban warnings and adjust settings if needed -- **Multiple accounts:** Use the `clusters` setting to run accounts in parallel -- **Start small:** Test with one account before scaling up -- **Capture logs:** Pipe output to a file or webhook for later review - ---- - -## โœ… Tests - -- `npm run test`: runs the node:test suite with ts-node to validate critical utilities. - ---- - -## ๐Ÿ”ง Common Issues & Quick Fixes - -### **"Error: Cannot find module"** -```bash -# Solution: Rebuild the project -npm run clean -npm run build -npm start -``` - -### **"Browser executable not found"** -```bash -# Solution: Install Chromium browser -npm run install:browser -# Or use the ultimate command -npm run go -``` - -### **"Account credentials invalid"** -- โœ… Check `src/accounts.jsonc` has correct email/password -- โœ… If 2FA enabled, verify `totp` field has correct secret -- โœ… Test manual login at https://login.live.com/ - -### **"Bot hangs or freezes"** -```bash -# Windows: Kill stuck Chrome processes -npm run kill-chrome-win - -# Then restart -npm start -``` - -### **"TypeScript compilation errors"** -```bash -# Check errors without building -npm run typecheck - -# Full rebuild -npm run clean -npm install -npm run build -``` - -### **"Chromium keeps reinstalling on every build"** -This is now fixed in v2.60.0! The bot creates a `.playwright-chromium-installed` marker file to prevent unnecessary reinstallations. - -If it still happens: -```bash -# Manually create the marker file -touch .playwright-chromium-installed # Mac/Linux -New-Item -Path .playwright-chromium-installed -ItemType File # Windows PowerShell -``` - -### **"Update system not working"** -```bash -# Manually check for updates -npm run build -# Watch the output for any TypeScript errors -``` - -### **"Scheduler not running immediately"** -This is fixed in v2.60.0! The bot now runs tasks immediately on startup before activating the schedule. - -**[๐Ÿ“– Complete Troubleshooting Guide โ†’](docs/troubleshooting.md)** - ---- - -## ๐Ÿ†˜ Need Help? - -- ๐Ÿ’ฌ **[Discord Community](https://discord.gg/k5uHkx9mne)** โ€” Get support & updates -- ๐Ÿ“– **[Documentation](docs/index.md)** โ€” Complete guides -- ๐Ÿ› **[Report Bug](https://github.com/LightZirconite/Microsoft-Rewards-Bot/issues)** โ€” Found an issue? -- ๏ฟฝ **[Troubleshooting](docs/troubleshooting.md)** โ€” Fix common problems - ---- - -## โš ๏ธ Disclaimer - -This bot automates Microsoft Rewards interactions, which **may violate their Terms of Service**. - -**Risks:** -- โš ๏ธ Account suspension or ban -- ๐Ÿšซ Loss of points and rewards - -**Educational purposes only.** Use at your own risk. - ---- - -## ๐Ÿ“„ License - -**CC BY-NC-SA 4.0** โ€” Personal use only, no commercial use. - -See [LICENSE](LICENSE) for details. - ---- - -
- -**โญ Star the repo** โ€ข **๐Ÿ’ฌ [Join Discord](https://discord.gg/k5uHkx9mne)** โ€ข **๏ฟฝ [Documentation](docs/index.md)** - -Made with โค๏ธ by the community - -
+

+ Microsoft Rewards Bot logo +
+ Join the Discord ยท Star the project +

+ +Automates Microsoft Rewards tasks so you collect points with minimal setup. + +## Install +- Install Node.js 20 or newer. +- Clone this repository. +- Run `npm install` inside the project folder. + +## Setup +- Copy `src/accounts.example.jsonc` to `src/accounts.jsonc` and add your accounts. +- Adjust `src/config.jsonc` only if you want to change defaults. +- (Optional) set `DISCORD_WEBHOOK_URL` for alerts. + +## Run +- `npm start` to build if needed and run once. +- `npm run dashboard` to view the web dashboard. +- `npm run dev` for local development mode. +- `npm run creator` for account creation mode (see warning below). +- `npm run docker:compose` to run in Docker. + +## Modes +- Default: runs daily tasks once, then stops. +- Dashboard: serves a simple web panel to monitor runs. +- Dev: runs from source with fast restarts for editing. +- Account creation: creates new Microsoft accounts. +- Docker: runs the bot in a container with built-in scheduling. + +## Account Creation Warning +- New accounts can be flagged if they earn points immediately. +- Let fresh accounts sit for a few weeks before using them. +- Use account creation mode only if you accept this risk. + +## Documentation +Short guides live in `docs/index.md`. diff --git a/api/report-error.js b/api/report-error.js new file mode 100644 index 0000000..1a117f7 --- /dev/null +++ b/api/report-error.js @@ -0,0 +1,119 @@ +const MAX_BODY_SIZE = 10000 +const MAX_TEXT = 900 +const MAX_FIELD = 120 + +function isPlainObject(value) { + return Boolean(value) && typeof value === 'object' && !Array.isArray(value) +} + +function trimAndLimit(value, limit) { + if (typeof value !== 'string') { + return '' + } + const trimmed = value.trim() + return trimmed.length > limit ? `${trimmed.slice(0, limit)}โ€ฆ` : trimmed +} + +function formatMetadata(metadata) { + if (!isPlainObject(metadata)) { + return 'Not provided' + } + const entries = Object.entries(metadata).filter(([key, val]) => typeof key === 'string' && (typeof val === 'string' || typeof val === 'number' || typeof val === 'boolean')) + if (entries.length === 0) { + return 'Not provided' + } + const limited = entries.slice(0, 6) + const lines = limited.map(([key, val]) => { + const valueText = trimAndLimit(String(val), MAX_FIELD) + return `${trimAndLimit(key, MAX_FIELD)}: ${valueText}` + }) + return lines.join('\n') +} + +async function readJsonBody(req) { + if (req.body) { + return req.body + } + let data = '' + for await (const chunk of req) { + data += chunk + if (data.length > MAX_BODY_SIZE) { + throw new Error('Payload too large') + } + } + if (!data) { + return {} + } + return JSON.parse(data) +} + +module.exports = async function handler(req, res) { + res.setHeader('Content-Type', 'application/json') + + if (req.method !== 'POST') { + res.setHeader('Allow', 'POST') + res.status(405).json({ error: 'Method not allowed' }) + return + } + + const webhookUrl = process.env.DISCORD_WEBHOOK_URL + if (!webhookUrl) { + res.status(500).json({ error: 'Webhook not configured' }) + return + } + + let body + try { + body = await readJsonBody(req) + } catch (error) { + res.status(400).json({ error: 'Invalid JSON body' }) + return + } + + const errorText = trimAndLimit(body.error, MAX_TEXT) + if (!errorText) { + res.status(400).json({ error: 'Field \'error\' is required' }) + return + } + + const summary = trimAndLimit(body.summary || body.message || '', 140) + const errorType = trimAndLimit(body.type || 'unspecified', 80) + const environment = trimAndLimit((body.environment && (body.environment.name || body.environment)) || process.env.VERCEL_ENV || process.env.NODE_ENV || 'unspecified', 80) + const metadata = formatMetadata(body.metadata) + + const embed = { + title: 'Error Report', + description: summary || 'Automated error report received', + color: 0xef4444, + fields: [ + { name: 'Error', value: errorText, inline: false }, + { name: 'Type', value: errorType, inline: true }, + { name: 'Environment', value: environment, inline: true } + ], + footer: { text: 'Microsoft Rewards Bot' }, + timestamp: new Date().toISOString() + } + + if (metadata && metadata !== 'Not provided') { + embed.fields.push({ name: 'Metadata', value: metadata, inline: false }) + } + + const payload = { embeds: [embed] } + + try { + const response = await fetch(webhookUrl, { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify(payload) + }) + + if (!response.ok) { + res.status(502).json({ error: 'Failed to deliver report' }) + return + } + + res.status(200).json({ status: 'reported' }) + } catch (error) { + res.status(502).json({ error: 'Failed to deliver report' }) + } +} diff --git a/docs/account-creation.md b/docs/account-creation.md new file mode 100644 index 0000000..f8d2fcb --- /dev/null +++ b/docs/account-creation.md @@ -0,0 +1,14 @@ +# Account Creation Mode + +## What it does +Creates new Microsoft accounts and prepares them for Rewards. + +## How to use +1. Make sure you accept the risk of new accounts being flagged if used immediately. +2. Run `npm run creator` for prompts, or add `-y` plus a recovery email for faster setup. +3. Let new accounts rest for a few weeks before earning points. + +## Example +```bash +npm run creator -- -y backup@example.com +``` diff --git a/docs/accounts.md b/docs/accounts.md deleted file mode 100644 index f15caa6..0000000 --- a/docs/accounts.md +++ /dev/null @@ -1,188 +0,0 @@ -# ๐Ÿ‘ค Accounts & 2FA Setup - -**Add your Microsoft accounts with secure TOTP authentication** - ---- - -## ๐Ÿ“ Quick Start - -### Basic Setup (No 2FA) - -**Edit** `src/accounts.json`: -```json -{ - "accounts": [ - { - "email": "your@email.com", - "password": "your_password", - "recoveryEmail": "backup@email.com" - } - ] -} -``` - -> โ„น๏ธ `recoveryEmail` is **optional but recommended**. It lets the bot verify Microsoft's masked hint during login and alert you if the recovery address ever changes. Simply leave it empty (`""`) if not needed. - -**That's it!** Run `npm start` to test. - ---- - -## ๐Ÿ” Add 2FA/TOTP (Recommended) - -### Why Use TOTP? -- โœ… **Automated login** โ€” No manual code entry -- โœ… **More secure** โ€” Better than SMS -- โœ… **Works 24/7** โ€” Ready for external schedulers - -### How to Get Your TOTP Secret - -1. **Open** https://account.live.com/proofs/Manage/additional (Security โ†’ Advanced security options โ†’ Additional security). -2. Enable two-step verification and click **Next** until you see the setup wizard. -3. Click the blue link **"Set up a different authenticator app"**. -4. On the next screen click **"I can't scan the bar code"** to reveal the Base32 secret. -5. Scan the QR with your preferred authenticator (Google Authenticator recommended to keep data separate from Microsoft) **and** copy the secret: - - The same secret can stay in your app and be saved in this file (multiple authenticators can share it). -6. Enter the 6-digit code in Microsoftโ€™s wizard to finish pairing. -7. **Add the secret to** `accounts.json`: - -```json -{ - "accounts": [ - { - "email": "your@email.com", - "password": "your_password", - "recoveryEmail": "backup@email.com", - "totp": "JBSWY3DPEHPK3PXP" - } - ] -} -``` - ---- - -## ๐Ÿšซ Skip the Recovery Email (Advanced) - -If an account genuinely has no recovery address or you prefer not to provide it, simply leave the `recoveryEmail` field empty: - -```json -{ - "accounts": [ - { - "email": "example@outlook.com", - "password": "strong_password", - "recoveryEmail": "" - } - ] -} -``` - -> โ„น๏ธ The bot will automatically skip recovery validation when this field is empty. A warning will be logged during startup, but the bot will function normally. - ---- - -## ๐ŸŽฏ Multiple Accounts - -```json -{ - "accounts": [ - { - "email": "account1@email.com", - "password": "password1", - "recoveryEmail": "backup1@email.com", - "totp": "SECRET1" - }, - { - "email": "account2@email.com", - "password": "password2", - "recoveryEmail": "backup2@email.com", - "totp": "SECRET2" - } - ] -} -``` - ---- - -## ๐ŸŒ Per-Account Proxy (Optional) - -```json -{ - "accounts": [ - { - "email": "your@email.com", - "password": "password", - "recoveryEmail": "backup@email.com", - "totp": "", - "proxy": { - "proxyAxios": true, - "url": "proxy.example.com", - "port": 8080, - "username": "proxyuser", - "password": "proxypass" - } - } - ] -} -``` - -โ†’ **[Full Proxy Guide](./proxy.md)** - ---- - -## ๐Ÿ”’ Environment Variables (Docker/CI) - -### Option 1: File Path -```bash -export ACCOUNTS_FILE=/path/to/accounts.json -``` - -### Option 2: Inline JSON -```bash -export ACCOUNTS_JSON='{"accounts":[{"email":"test@example.com","password":"pass"}]}' -``` - ---- - -## ๐Ÿ› ๏ธ Troubleshooting - -| Problem | Solution | -|---------|----------| -| **"accounts.json not found"** | Create file or set `ACCOUNTS_FILE` env var | -| **"2FA prompt not auto-filled"** | Check TOTP secret is valid Base32 | -| **"Invalid TOTP"** | Verify system time is correct | -| **"Account locked"** | Manually unlock in Microsoft Account | -| **"Login timeout"** | Check internet connection, try proxy | - -### 2FA Not Working? - -1. **Check secret format** โ€” Should be Base32 (only letters/numbers, no spaces) -2. **Verify system time** โ€” Must be accurate (NTP sync) -3. **Test manually** โ€” Use authenticator app to verify code works -4. **Remove backup codes** โ€” Some security settings block TOTP - ---- - -## ๐Ÿ”’ Security Tips - -- ๐Ÿ” **Use strong passwords** โ€” Unique for each account -- ๐Ÿ”‘ **Enable TOTP** โ€” More secure than SMS -- ๐Ÿ“ **Restrict file permissions** โ€” `chmod 600 accounts.json` (Linux) -- ๐Ÿ”„ **Rotate passwords** โ€” Change every 90 days -- ๐Ÿšซ **Never commit** โ€” Add `accounts.json` to `.gitignore` - ---- - -## ๐Ÿ“š Next Steps - -**TOTP setup?** -โ†’ **[Security Guide](./security.md)** for best practices - -**Ready for automation?** -โ†’ **[External Scheduling](./schedule.md)** - -**Need proxies?** -โ†’ **[Proxy Guide](./proxy.md)** - ---- - -**[โ† Back to Hub](./index.md)** | **[Getting Started](./getting-started.md)** diff --git a/docs/build-system.md b/docs/build-system.md deleted file mode 100644 index 6fd6bfb..0000000 --- a/docs/build-system.md +++ /dev/null @@ -1,288 +0,0 @@ -# Build System Documentation - -## ๐Ÿ“‹ Overview - -The Microsoft Rewards Bot uses a **clean, automated build system** that handles TypeScript compilation and browser installation automatically. - -## ๐Ÿš€ Quick Start - -### First Time Setup -```bash -npm install -``` -**This command does everything:** -- โœ… Installs all Node.js dependencies -- โœ… Compiles TypeScript to JavaScript -- โœ… Installs Chromium browser automatically - -### Run the Bot -```bash -npm start -``` -**No build step needed!** The bot is ready to run immediately after `npm install`. - -## ๐Ÿ“ฆ Available Commands - -| Command | Description | Use When | -|---------|-------------|----------| -| `npm install` | **Complete setup** (deps + build + browser) | First time, after updates | -| `npm start` | **Run the bot** (production) | Normal usage | -| `npm run build` | Compile TypeScript + install browser | Manual rebuild needed | -| `npm run dev` | **Dev mode** (TypeScript directly, hot reload) | Development only | -| `npm run creator` | Account creation wizard | Creating new accounts | -| `npm run dashboard` | Web dashboard (production) | Remote monitoring | -| `npm run dashboard-dev` | Web dashboard (dev mode) | Dashboard development | -| `npm run typecheck` | Type checking only (no build) | Quick validation | -| `npm run test` | Run test suite | Development | -| `npm run clean` | Delete compiled files | Before fresh rebuild | -| `npm run kill-chrome` | Kill all Chrome processes | Cleanup after crashes | - -## ๐Ÿ”„ Build Workflow (Automatic) - -### When you run `npm install`: -``` -1. npm installs dependencies - โ†“ -2. postinstall hook triggers - โ†“ -3. npm run build executes - โ†“ -4. prebuild hook checks for Chromium - โ†“ -5. If Chromium missing: npx playwright install chromium - โ†“ -6. TypeScript compilation (tsc) - โ†“ -7. postbuild hook shows success message -``` - -**Result:** Bot is ready to use! - -### When you run `npm run build`: -``` -1. prebuild hook checks for Chromium - โ†“ -2. If missing: Install Chromium automatically - โ†“ -3. Compile TypeScript (src/ โ†’ dist/) - โ†“ -4. Show success message -``` - -### When you run `npm start`: -``` -1. Run compiled JavaScript (dist/index.js) - โ†“ -2. No build check (already done by npm install) -``` - -## ๐Ÿณ Docker Workflow - -### Docker Build Process -```bash -npm run docker:build -``` - -**What happens:** -1. **Stage 1 (Builder):** - - Install all dependencies - - Build TypeScript - - Reinstall production-only dependencies - - Install Chromium Headless Shell - - Clean up build artifacts - -2. **Stage 2 (Runtime):** - - Copy compiled code (`dist/`) - - Copy production dependencies (`node_modules/`) - - **Copy Chromium browser** (`node_modules/@playwright/`) - - Install minimal system libraries - - Configure cron for scheduling - -### Docker Run -```bash -npm run docker:run -``` - -Or with Docker Compose: -```bash -cd docker -docker compose up -d -``` - -### Environment Variables (Docker) -| Variable | Default | Description | -|----------|---------|-------------| -| `PLAYWRIGHT_BROWSERS_PATH` | `0` | Use browsers in node_modules (required) | -| `FORCE_HEADLESS` | `1` | Run in headless mode (required for Docker) | -| `TZ` | `UTC` | Container timezone | -| `CRON_SCHEDULE` | **Required** | Cron schedule (e.g., `0 9 * * *`) | -| `RUN_ON_START` | `false` | Run immediately on container start | -| `SKIP_RANDOM_SLEEP` | `false` | Skip random delay before execution | - -## ๐Ÿ”ง Development Workflow - -### Hot Reload Development -```bash -npm run dev -``` -- Runs TypeScript directly (no compilation needed) -- Auto-reloads on file changes -- Uses `-dev` flag (loads `accounts.dev.json` if it exists) - -### Type Checking -```bash -npm run typecheck -``` -- Validates TypeScript types without compiling -- Faster than full build -- Use before committing code - -### Testing -```bash -npm run test -``` -- Runs all unit tests in `tests/` directory -- Uses Node.js native test runner - -### Clean Build -```bash -npm run clean -npm run build -``` -- Deletes `dist/` folder -- Rebuilds everything from scratch - -## ๐Ÿ› ๏ธ Troubleshooting - -### "Chromium not installed" Error - -**Symptoms:** -``` -[ERROR] DESKTOP [BROWSER] Chromium not installed. Run "npm run pre-build" or set AUTO_INSTALL_BROWSERS=1 -``` - -**Solution:** -```bash -npx playwright install chromium --with-deps -``` - -**Or set environment variable:** -```bash -# Windows (PowerShell) -$env:AUTO_INSTALL_BROWSERS="1" -npm start - -# Linux/Mac -export AUTO_INSTALL_BROWSERS=1 -npm start -``` - -### Docker: "Chromium not installed" After First Run - -**Root Cause:** Chromium browser files not copied from builder stage. - -**Solution:** Rebuild Docker image with fixed Dockerfile: -```bash -docker build --no-cache -t microsoft-rewards-bot -f docker/Dockerfile . -``` - -The updated Dockerfile now includes: -```dockerfile -COPY --from=builder /usr/src/microsoft-rewards-bot/node_modules/@playwright ./node_modules/@playwright -``` - -### "Build not found" on Every `npm start` - -**Root Cause:** Old version had unnecessary `prestart` hook that checked for build on every start. - -**Solution:** Update to latest version. The `prestart` hook has been removed - build happens automatically during `npm install`. - -### TypeScript Compilation Errors - -**Check for missing dependencies:** -```bash -npm install -``` - -**Verify tsconfig.json is valid:** -```bash -npm run typecheck -``` - -**Clean rebuild:** -```bash -npm run clean -npm run build -``` - -## ๐Ÿ“ Directory Structure - -``` -Microsoft-Rewards-Bot/ -โ”œโ”€โ”€ src/ # TypeScript source code -โ”‚ โ”œโ”€โ”€ index.ts # Main entry point -โ”‚ โ”œโ”€โ”€ config.jsonc # User configuration -โ”‚ โ”œโ”€โ”€ accounts.jsonc # Account credentials (gitignored) -โ”‚ โ””โ”€โ”€ ... -โ”œโ”€โ”€ dist/ # Compiled JavaScript (generated) -โ”‚ โ”œโ”€โ”€ index.js # Compiled entry point -โ”‚ โ””โ”€โ”€ ... -โ”œโ”€โ”€ node_modules/ # Dependencies -โ”‚ โ””โ”€โ”€ @playwright/ # Chromium browser files -โ”œโ”€โ”€ docker/ # Docker configuration -โ”‚ โ”œโ”€โ”€ Dockerfile # Multi-stage Docker build -โ”‚ โ”œโ”€โ”€ compose.yaml # Docker Compose config -โ”‚ โ”œโ”€โ”€ entrypoint.sh # Container initialization -โ”‚ โ”œโ”€โ”€ run_daily.sh # Daily execution script -โ”‚ โ””โ”€โ”€ crontab.template # Cron schedule template -โ”œโ”€โ”€ package.json # Dependencies + scripts -โ”œโ”€โ”€ tsconfig.json # TypeScript configuration -โ””โ”€โ”€ README.md # Main documentation -``` - -## ๐Ÿ” Environment Variables - -### General -| Variable | Description | Example | -|----------|-------------|---------| -| `NODE_ENV` | Runtime environment | `production`, `development` | -| `DEBUG_REWARDS_VERBOSE` | Enable verbose logging | `1` | -| `FORCE_HEADLESS` | Force headless browser | `1` | -| `AUTO_INSTALL_BROWSERS` | Auto-install Chromium if missing | `1` | -| `SKIP_RANDOM_SLEEP` | Skip random delays | `true` | - -### Docker-Specific -| Variable | Description | Required | -|----------|-------------|----------| -| `CRON_SCHEDULE` | Cron expression for scheduling | โœ… Yes | -| `TZ` | Timezone (e.g., `America/New_York`) | โŒ No (default: UTC) | -| `RUN_ON_START` | Run immediately on container start | โŒ No (default: false) | -| `PLAYWRIGHT_BROWSERS_PATH` | Browser location (must be `0`) | โœ… Yes (set in Dockerfile) | - -## ๐Ÿ“š Related Documentation - -- **Getting Started:** [docs/getting-started.md](getting-started.md) -- **Configuration:** [docs/config.md](config.md) (via inline comments in `src/config.jsonc`) -- **Accounts:** [docs/accounts.md](accounts.md) -- **Scheduling:** [src/scheduler/README.md](../src/scheduler/README.md) -- **Docker Deployment:** [docker/README.md](../docker/README.md) (if exists) - -## โœ… Best Practices - -1. **Always use `npm install` for initial setup** - It does everything automatically -2. **Use `npm start` for normal runs** - No manual build needed -3. **Use `npm run dev` for development** - Faster iteration with hot reload -4. **Clean rebuild if weird errors occur** - `npm run clean && npm run build` -5. **Docker users: Rebuild image after Dockerfile changes** - `docker build --no-cache` -6. **Set `AUTO_INSTALL_BROWSERS=1` if Chromium issues persist** - Automatic fallback - -## ๐Ÿ†˜ Getting Help - -- **Discord:** https://discord.gg/k5uHkx9mne -- **GitHub Issues:** https://github.com/LightZirconite/Microsoft-Rewards-Bot/issues -- **Documentation:** [docs/index.md](index.md) - ---- - -**Last Updated:** November 2025 -**Applies To:** v2.56.7+ diff --git a/docs/commands.md b/docs/commands.md deleted file mode 100644 index d2437a2..0000000 --- a/docs/commands.md +++ /dev/null @@ -1,389 +0,0 @@ -# NPM Commands Reference - -This guide explains all available npm commands and when to use them. - -## โšก **NEW - Ultimate Command** (v2.60.0) - -### `npm run go` โญ -**THE simplest way to run the bot** - Does EVERYTHING automatically! - -```bash -npm install # Install dependencies (first time only) -npm run go # Does EVERYTHING else! -``` - -**What it does:** -1. โœ… Checks if Chromium browser is installed โ†’ Installs if missing -2. โœ… Checks if project is built (`dist/`) โ†’ Builds if missing -3. โœ… Starts the bot immediately - -**When to use:** -- **First time setup** (after `npm install`) -- **After git pull** (ensures browser + build are ready) -- **Daily use** (simplest command) -- **When unsure** (it checks everything!) - ---- - -## ๐Ÿš€ Essential Commands - -### `npm start` -**Start the bot** - Use this to run the Microsoft Rewards Bot after setup. - -```bash -npm start -``` - -**What it does:** -- Runs the compiled JavaScript from `dist/index.js` -- Checks for automatic updates (if enabled) -- Executes reward earning tasks -- Fastest way to run the bot - -**When to use:** -- Daily bot execution -- After setup is complete -- When you want to earn points - ---- - -### `npm run setup` -**First-time installation** - Run this only once when setting up the project. - -```bash -npm run setup -``` - -**What it does:** -1. Creates `accounts.jsonc` from template -2. Guides you through account configuration -3. Installs dependencies (`npm install`) -4. Builds TypeScript (`npm run build`) -5. Installs Playwright browsers - -**When to use:** -- First time installing the bot -- After fresh git clone -- To reconfigure accounts - -**Important:** This does NOT start the bot automatically. After setup, run `npm start`. - ---- - -## ๐Ÿ”จ Development Commands - -### `npm run build` -**Build TypeScript to JavaScript** - Compiles the project. - -```bash -npm run build -``` - -**What it does:** -- Compiles `src/*.ts` files to `dist/*.js` -- Generates source maps for debugging -- Required before running `npm start` - -**When to use:** -- After modifying TypeScript source code -- Before starting the bot with `npm start` -- After pulling updates from git - ---- - -### `npm run dev` -**Development mode** - Run TypeScript directly without building. - -```bash -npm run dev -``` - -**What it does:** -- Runs TypeScript files directly with `ts-node` -- No build step required -- Slower but convenient for development -- Includes `-dev` flag for debug features - -**When to use:** -- During development/testing -- When making code changes -- Quick testing without full build - ---- - -### `npm run ts-start` -**TypeScript direct execution** - Like `dev` but without debug flags. - -```bash -npm run ts-start -``` - -**When to use:** -- Alternative to `npm run dev` -- Running TypeScript without full build - ---- - -## ๐Ÿงน Maintenance Commands - -### `npm run clean` -**Remove build artifacts** - Deletes the `dist` folder. - -```bash -npm run clean -``` - -**When to use:** -- Before fresh rebuild -- To clear stale compiled code -- Troubleshooting build issues - ---- - -### `npm run install-deps` -**Install all dependencies** - Fresh installation of dependencies and browsers. - -```bash -npm run install-deps -``` - -**What it does:** -- Runs `npm install` to install Node.js packages -- Installs Playwright Chromium browser - -**When to use:** -- After deleting `node_modules` -- Setting up on new machine -- Troubleshooting dependency issues - ---- - -### `npm run typecheck` -**Check TypeScript types** - Validates code without building. - -```bash -npm run typecheck -``` - -**When to use:** -- Checking for type errors -- Before committing code -- Part of CI/CD pipeline - ---- - -## ๐Ÿงช Testing & Quality - -### `npm test` -**Run unit tests** - Execute test suite. - -```bash -npm test -``` - -**When to use:** -- Verifying code changes -- Before submitting pull requests -- Continuous integration - ---- - -### `npm run lint` -**Check code style** - ESLint validation. - -```bash -npm run lint -``` - -**When to use:** -- Checking code formatting -- Before commits -- Maintaining code quality - ---- - -## ๐Ÿ“Š Dashboard Commands - -### `npm run dashboard` -**Start web dashboard only** - Web interface without bot execution. - -```bash -npm run dashboard -``` - -**What it does:** -- Launches web interface on http://localhost:3000 -- Provides monitoring and control panel -- Does NOT start reward earning - -**When to use:** -- Monitoring bot status -- Viewing logs remotely -- Configuring settings via UI - ---- - -### `npm run dashboard-dev` -**Dashboard development mode** - TypeScript version of dashboard. - -```bash -npm run dashboard-dev -``` - -**When to use:** -- Dashboard development/testing -- Quick dashboard testing without build - ---- - -## ๐Ÿค– Account Creation - -### `npm run creator` -**Account creation wizard** - Create new Microsoft accounts. - -```bash -# Interactive mode -npm run creator - -# With auto-accept and recovery email (copy-paste URL directly from Microsoft) -npm run creator -- -y backup@gmail.com "https://rewards.bing.com/welcome?rh=YOUR_CODE" -``` - -**When to use:** -- Creating new Microsoft accounts -- Bulk account creation -- Testing account setup - ---- - -## ๐Ÿณ Docker Commands - -### `npm run create-docker` -**Build Docker image** - Create containerized version. - -```bash -npm run create-docker -``` - -**When to use:** -- Deploying with Docker -- Creating container image -- Testing Docker setup - ---- - -## ๐Ÿ†˜ Troubleshooting Commands - -### `npm run kill-chrome-win` (Windows only) -**Force close Chrome browsers** - Kill stuck browser processes. - -```bash -npm run kill-chrome-win -``` - -**When to use:** -- Browser processes stuck -- Windows only -- Before restarting bot - ---- - -## ๐Ÿ“ Command Comparison - -| Command | Speed | Purpose | When to Use | -|---------|-------|---------|-------------| -| `npm start` | โšก Fast | Run bot | Daily use | -| `npm run dev` | ๐ŸŒ Slow | Development | Code changes | -| `npm run build` | โฑ๏ธ Medium | Compile TS | Before start | -| `npm run setup` | โฑ๏ธ Medium | First install | Once only | - ---- - -## Common Workflows - -### First-Time Setup -```bash -# 1. Run setup wizard -npm run setup - -# 2. Start the bot -npm start -``` - -### Daily Usage -```bash -npm start -``` - -### After Code Changes -```bash -# Method 1: Build then run (faster) -npm run build -npm start - -# Method 2: Direct run (slower) -npm run dev -``` - -### After Pulling Updates -```bash -# If dependencies changed -npm install - -# Rebuild -npm run build - -# Start bot -npm start -``` - -### Troubleshooting -```bash -# Clean install -npm run clean -rm -rf node_modules package-lock.json -npm run install-deps - -# Rebuild -npm run build - -# Test -npm start -``` - ---- - -## โ“ FAQ - -### Why does `npm run start` trigger updates? -The bot automatically checks for updates on startup (configurable in `config.jsonc`). To disable: -```jsonc -{ - "update": { - "enabled": false - } -} -``` - -### What's the difference between `npm start` and `npm run start`? -**No functional difference** - both run the same command. `npm start` is a shorthand for `npm run start`. - -### Should I use `npm start` or `npm run dev`? -- **Production/Daily use:** `npm start` (faster) -- **Development:** `npm run dev` (no build needed) - -### How do I completely reset the project? -```bash -npm run clean -rm -rf node_modules package-lock.json dist -npm run setup -``` - ---- - -## Need Help? - -- **Getting Started:** [docs/getting-started.md](getting-started.md) -- **Configuration:** [docs/config.md](config.md) -- **Troubleshooting:** [docs/troubleshooting.md](troubleshooting.md) -- **Discord:** https://discord.gg/k5uHkx9mne diff --git a/docs/configuration.md b/docs/configuration.md new file mode 100644 index 0000000..60971e1 --- /dev/null +++ b/docs/configuration.md @@ -0,0 +1,23 @@ +# Configuration + +## What it does +Controls how the bot behaves through `src/config.jsonc`. + +## How to use +- Open `src/config.jsonc` and edit only the fields you need. +- Keep `humanization.enabled` true to mimic real usage. +- Adjust `workers` to enable or disable search, quizzes, and promotions. +- Set `scheduling.enabled` to automate runs. + +## Example +```jsonc +{ + "humanization": { "enabled": true }, + "workers": { + "doDesktopSearch": true, + "doMobileSearch": true, + "doDailySet": true + }, + "scheduling": { "enabled": false } +} +``` diff --git a/docs/dashboard.md b/docs/dashboard.md new file mode 100644 index 0000000..d0cc6b0 --- /dev/null +++ b/docs/dashboard.md @@ -0,0 +1,14 @@ +# Dashboard + +## What it does +Shows live status and logs in a simple web page. + +## How to use +1. Run `npm run dashboard`. +2. Open http://localhost:3000 in your browser. +3. Stop the dashboard with Ctrl+C when finished. + +## Example +```bash +npm run dashboard +``` diff --git a/docs/docker-deployment.md b/docs/docker-deployment.md deleted file mode 100644 index e35353e..0000000 --- a/docs/docker-deployment.md +++ /dev/null @@ -1,482 +0,0 @@ -# Docker Deployment Guide - -Complete guide for containerized deployment with built-in scheduling. - -## ๐Ÿ“‚ Docker File Structure - -``` -Microsoft-Rewards-Bot/ -โ”œโ”€โ”€ docker/ # All Docker-related files -โ”‚ โ”œโ”€โ”€ Dockerfile # Multi-stage build configuration -โ”‚ โ”œโ”€โ”€ compose.yaml # Service definition -โ”‚ โ”œโ”€โ”€ entrypoint.sh # Container initialization -โ”‚ โ”œโ”€โ”€ run_daily.sh # Daily execution wrapper + locking -โ”‚ โ””โ”€โ”€ crontab.template # Cron job template -โ”œโ”€โ”€ src/ -โ”‚ โ”œโ”€โ”€ accounts.jsonc # Your accounts (volume mount) -โ”‚ โ””โ”€โ”€ config.jsonc # Bot configuration (volume mount) -โ””โ”€โ”€ package.json # Build scripts -``` - -**Important:** All Docker files are in the `docker/` folder, but the build context is the **project root** (to access `src/`, `package.json`, etc.) - ---- - -## ๐Ÿš€ Quick Start - -### 1. Build the Image - -**Option A: Using npm script (recommended)** -```bash -# From project root -npm run docker:build -``` - -**Option B: Direct Docker command** -```bash -# From project root -docker build -f docker/Dockerfile -t microsoft-rewards-bot . -``` - -**Why from root?** The Dockerfile needs access to `src/`, `package.json`, `tsconfig.json`. Docker can't copy files outside the build context. - -### 2. Configure Environment - -Edit `docker/compose.yaml`: -```yaml -environment: - TZ: "America/New_York" # Your timezone - CRON_SCHEDULE: "0 9 * * *" # Daily at 9 AM - RUN_ON_START: "true" # Run immediately on start -``` - -### 3. Start the Container - -**Option A: Using npm script** -```bash -npm run docker:compose -``` - -**Option B: Direct docker compose command** -```bash -docker compose -f docker/compose.yaml up -d -``` - -**Note:** Volumes in `compose.yaml` use relative paths from `docker/`: -- `./src/` โ†’ `docker/../src/` (goes to project root) -- `./sessions/` โ†’ `docker/sessions/` (local to docker folder) - -## ๐Ÿ“‹ Configuration Files - -The container needs access to your configuration files via volume mounts: - -```yaml -volumes: - # Read-only mounts for configuration (prevents accidental container edits) - - ../src/accounts.jsonc:/usr/src/microsoft-rewards-bot/accounts.jsonc:ro - - ../src/config.jsonc:/usr/src/microsoft-rewards-bot/config.jsonc:ro - - # Read-write mount for persistent login sessions - - ../sessions:/usr/src/microsoft-rewards-bot/sessions -``` - -**Paths explained:** -- `../src/accounts.jsonc` = `docker/../src/accounts.jsonc` (relative from compose.yaml location, goes to project root) -- `../sessions` = `docker/../sessions/` (project root sessions folder) - -**Before starting:** -1. Create `src/accounts.jsonc` (copy from `src/accounts.example.jsonc`) -2. Edit `src/config.jsonc` with your settings -3. (Optional) Create `sessions/` directory at project root for persistent login - ---- - -## ๐Ÿ—๏ธ Architecture & Build Process - -### Two-Stage Docker Build - -**Stage 1: Builder** -```dockerfile -FROM node:22-slim AS builder -# 1. Install dependencies + dev dependencies -# 2. Compile TypeScript โ†’ JavaScript (dist/) -# 3. Install Playwright Chromium -# 4. Remove dev dependencies (keep only production) -``` - -**Stage 2: Runtime** -```dockerfile -FROM node:22-slim AS runtime -# 1. Install minimal system libraries for Chromium -# 2. Copy compiled code + dependencies from builder -# 3. Copy runtime scripts (entrypoint.sh, run_daily.sh) -# 4. Configure cron daemon -``` - -**Why two stages?** -- Smaller final image (~800 MB vs 1.5 GB) -- No build tools in production -- Security: no dev dependencies - -### Build Context Explained - -```bash -# โŒ WRONG: Building from docker/ folder -cd docker -docker build -t bot . -# Error: Cannot find package.json, src/, etc. - -# โœ… CORRECT: Build from root, specify Dockerfile location -cd /path/to/Microsoft-Rewards-Bot -docker build -f docker/Dockerfile -t bot . -# Success: Access to all project files -``` - -**The Dockerfile copies files relative to project root:** -```dockerfile -COPY package.json tsconfig.json ./ # From project root -COPY src/ ./src/ # From project root -COPY docker/run_daily.sh ./docker/ # Subfolder -``` - ---- - -## ๐Ÿ”ง Environment Variables - -| Variable | Required | Default | Description | -|----------|----------|---------|-------------| -| `CRON_SCHEDULE` | โœ… Yes | N/A | Cron expression (e.g., `0 9 * * *`) | -| `TZ` | โŒ No | `UTC` | Timezone (e.g., `America/New_York`) | -| `RUN_ON_START` | โŒ No | `false` | Run immediately on container start | -| `SKIP_RANDOM_SLEEP` | โŒ No | `false` | Skip random delay before execution | -| `MIN_SLEEP_MINUTES` | โŒ No | `5` | Minimum random delay (minutes) | -| `MAX_SLEEP_MINUTES` | โŒ No | `50` | Maximum random delay (minutes) | -| `STUCK_PROCESS_TIMEOUT_HOURS` | โŒ No | `8` | Kill stuck processes after N hours | -| `PLAYWRIGHT_BROWSERS_PATH` | ๐Ÿ”’ Fixed | `0` | Use browsers in node_modules (DO NOT CHANGE) | -| `FORCE_HEADLESS` | ๐Ÿ”’ Fixed | `1` | Headless mode (DO NOT CHANGE) | -| `NODE_ENV` | ๐Ÿ”’ Fixed | `production` | Production environment (DO NOT CHANGE) | - -## ๐Ÿ“… Scheduling Examples - -Use [crontab.guru](https://crontab.guru) to create cron expressions. - -| Schedule | Cron Expression | Description | -|----------|----------------|-------------| -| Daily at 9 AM | `0 9 * * *` | Once per day | -| Every 6 hours | `0 */6 * * *` | 4 times daily | -| Twice daily (9 AM, 9 PM) | `0 9,21 * * *` | Morning & evening | -| Weekdays at 8 AM | `0 8 * * 1-5` | Monday-Friday only | -| Random time (7-8 AM) | `0 7 * * *` + random sleep | Use `MIN_SLEEP_MINUTES`/`MAX_SLEEP_MINUTES` | - -**Example with Random Delay:** -```yaml -environment: - CRON_SCHEDULE: "0 7 * * *" # Start scheduling at 7 AM - MIN_SLEEP_MINUTES: "0" # No minimum delay - MAX_SLEEP_MINUTES: "60" # Up to 1 hour delay - # Result: Runs between 7:00 AM - 8:00 AM randomly -``` - -## ๐Ÿ” Monitoring - -### View Logs -```bash -docker logs -f microsoft-rewards-bot -``` - -### Check Container Status -```bash -docker ps -a | grep microsoft-rewards-bot -``` - -### Health Check -```bash -docker inspect microsoft-rewards-bot --format='{{.State.Health.Status}}' -``` - -Expected output: `healthy` - -### Execute Commands Inside Container -```bash -# Check cron status -docker exec microsoft-rewards-bot crontab -l - -# Check timezone -docker exec microsoft-rewards-bot date - -# List running processes -docker exec microsoft-rewards-bot ps aux -``` - -## ๐Ÿ› ๏ธ Troubleshooting - -### โŒ Build Error: "Cannot find module 'package.json'" - -**Cause:** Wrong build context - building from `docker/` instead of project root. - -**Solution:** -```bash -# โŒ WRONG -cd docker -docker build -t bot . - -# โœ… CORRECT (from project root) -docker build -f docker/Dockerfile -t bot . -# Or use npm script -npm run docker:build -``` - -### โŒ Build Error: "COPY failed: file not found: docker/run_daily.sh" - -**Cause:** `.dockerignore` file excludes `docker/` folder. - -**Solution:** Check `.dockerignore` - it should NOT contain `docker/`: -```ignore -# โŒ BAD -docker/ - -# โœ… GOOD (current config) -scripts/installer/ -``` - -### โŒ "Chromium not installed" After First Run - -**Symptoms:** -- Bot works on first run -- Fails on subsequent scheduled runs with "Chromium not installed" - -**Root Cause:** -Fixed in v2.56.7+! Chromium browser files are now copied correctly from builder stage. - -**Solution:** -```bash -# Rebuild with latest Dockerfile (includes fix) -npm run docker:build -docker compose -f docker/compose.yaml down -docker compose -f docker/compose.yaml up -d -``` - -**Verification:** -Check that Chromium is present in the container: -```bash -docker exec microsoft-rewards-bot ls -la /usr/src/microsoft-rewards-bot/node_modules/@playwright/ -``` - -You should see `browser-chromium/` directory. - -### โŒ Container Exits Immediately - -**Check logs:** -```bash -docker logs microsoft-rewards-bot -``` - -**Common causes:** -1. **Missing CRON_SCHEDULE:** Set environment variable in compose.yaml - ```yaml - environment: - CRON_SCHEDULE: "0 9 * * *" # Required! - ``` - -2. **Invalid cron expression:** Validate at https://crontab.guru - -3. **Script not executable:** Dockerfile should handle this automatically - ```dockerfile - COPY --chmod=755 docker/entrypoint.sh /usr/local/bin/entrypoint.sh - ``` - -**Fix:** -```bash -# Update compose.yaml with correct CRON_SCHEDULE -docker compose -f docker/compose.yaml down -docker compose -f docker/compose.yaml up -d -``` - -### โŒ "Permission denied: entrypoint.sh" - -**Cause:** Script not executable or Windows CRLF line endings. - -**Solution:** The Dockerfile handles both automatically: -```dockerfile -COPY --chmod=755 docker/entrypoint.sh /usr/local/bin/entrypoint.sh -RUN sed -i 's/\r$//' /usr/local/bin/entrypoint.sh # Convert CRLF โ†’ LF -``` - -If still failing, manually fix line endings: -```bash -# Linux/Mac -dos2unix docker/entrypoint.sh docker/run_daily.sh - -# Or with sed -sed -i 's/\r$//' docker/entrypoint.sh -sed -i 's/\r$//' docker/run_daily.sh -``` - -### โŒ Volumes Not Mounting - -### โŒ Volumes Not Mounting - -**Check if files exist:** -```bash -# From docker/ folder -ls -la ../src/accounts.jsonc ../src/config.jsonc - -# Or from project root -ls -la src/accounts.jsonc src/config.jsonc -``` - -**Verify volume paths in running container:** -```bash -docker inspect microsoft-rewards-bot | grep -A 10 Mounts -``` - -**Fix paths in compose.yaml:** -```yaml -# Paths are relative to compose.yaml location (docker/) -volumes: - - ../src/accounts.jsonc:/usr/src/microsoft-rewards-bot/accounts.jsonc:ro - # This resolves to: docker/../src/accounts.jsonc (project root) - # Note: Files mount to project root, NOT dist/ (Load.ts searches multiple locations) -``` - ---- - -## ๐Ÿ“š Complete File Reference - -### `docker/Dockerfile` -Multi-stage build configuration: -- **Builder stage:** Compiles TypeScript, installs Playwright -- **Runtime stage:** Minimal image with only production dependencies - -### `docker/compose.yaml` -Service definition with: -- Build context (points to project root) -- Volume mounts (configuration files) -- Environment variables (scheduling, timezone) -- Resource limits (CPU, memory) -- Health checks (cron daemon monitoring) - -### `docker/entrypoint.sh` -Container initialization script: -1. Configures timezone from `TZ` env var -2. Validates `CRON_SCHEDULE` is set -3. Optionally runs bot immediately (`RUN_ON_START=true`) -4. Templates cron job with environment variables -5. Starts cron daemon in foreground - -### `docker/run_daily.sh` -Daily execution wrapper: -- File-based locking (prevents concurrent runs) -- Self-healing lockfile validation -- Random sleep delay (anti-detection) -- Stuck process killer (timeout after N hours) -- Executes `npm start` - -### `docker/crontab.template` -Cron job template with variable interpolation: -```bash -${CRON_SCHEDULE} TZ=${TZ} /bin/bash /usr/src/microsoft-rewards-bot/docker/run_daily.sh >> /proc/1/fd/1 2>&1 -``` - -Expanded by `entrypoint.sh` using `envsubst`. - ---- - -## ๐ŸŽฏ Build & Deployment Checklist - -### Pre-Build Checklist -- [ ] Files exist: `src/accounts.jsonc`, `src/config.jsonc` -- [ ] Docker installed and running -- [ ] At project root (not in `docker/` folder) -- [ ] `.dockerignore` does NOT exclude `docker/` folder - -### Build Steps -```bash -# 1. Clean previous builds (optional) -docker rmi microsoft-rewards-bot - -# 2. Build image -npm run docker:build -# Or: docker build -f docker/Dockerfile -t microsoft-rewards-bot . - -# 3. Verify image created -docker images | grep microsoft-rewards-bot -``` - -### Deployment Steps -```bash -# 1. Configure compose.yaml -# - Set CRON_SCHEDULE (required) -# - Set TZ (optional, default UTC) -# - Set RUN_ON_START (optional, default false) - -# 2. Start container -npm run docker:compose -# Or: docker compose -f docker/compose.yaml up -d - -# 3. Verify running -docker ps | grep microsoft-rewards-bot - -# 4. Check logs -docker logs -f microsoft-rewards-bot - -# 5. Verify health -docker inspect microsoft-rewards-bot --format='{{.State.Health.Status}}' -``` - ---- - -## ๐Ÿ” Debugging Commands - -### Check Build Context -```bash -# List files Docker can see during build -docker build -f docker/Dockerfile -t test . --progress=plain 2>&1 | grep "COPY" -``` - -### Inspect Running Container -```bash -# Shell access -docker exec -it microsoft-rewards-bot bash - -# Check environment variables -docker exec microsoft-rewards-bot env - -# Check cron jobs -docker exec microsoft-rewards-bot crontab -l - -# Check timezone -docker exec microsoft-rewards-bot date - -# Check Playwright browsers -docker exec microsoft-rewards-bot ls -la node_modules/@playwright/ - -# Check running processes -docker exec microsoft-rewards-bot ps aux -``` - -### Test Scripts Manually -```bash -# Test entrypoint -docker exec microsoft-rewards-bot /usr/local/bin/entrypoint.sh - -# Test run_daily (bypass lock) -docker exec microsoft-rewards-bot bash -c "rm -f /tmp/run_daily.lock && docker/run_daily.sh" - -# Test bot directly -docker exec microsoft-rewards-bot npm start -``` - ---- - -## ๐Ÿ“– Additional Resources - -- **Build System:** [docs/build-system.md](build-system.md) -- **Scheduling:** [src/scheduler/README.md](../src/scheduler/README.md) -- **Configuration:** [src/config.jsonc](../src/config.jsonc) (inline comments) -- **Accounts:** [docs/accounts.md](accounts.md) - ---- - -**Last Updated:** November 2025 -**Applies To:** v2.56.7+ diff --git a/docs/docker.md b/docs/docker.md new file mode 100644 index 0000000..bb92b32 --- /dev/null +++ b/docs/docker.md @@ -0,0 +1,14 @@ +# Docker + +## What it does +Runs the bot in a container with bundled scheduling and browser setup. + +## How to use +- Ensure `src/accounts.jsonc` and `src/config.jsonc` are present before starting. +- Run `npm run docker:compose` to build and start the container. +- View logs with `docker logs -f microsoft-rewards-bot` or the compose service name. + +## Example +```bash +npm run docker:compose +``` diff --git a/docs/error-reporting.md b/docs/error-reporting.md new file mode 100644 index 0000000..93748fa --- /dev/null +++ b/docs/error-reporting.md @@ -0,0 +1,16 @@ +# Error Reporting API + +## What it does +Accepts structured error reports and forwards them to Discord in a clean format. + +## How to use +- Set `DISCORD_WEBHOOK_URL` in your environment. +- Send a POST request to `/api/report-error` with JSON that includes at least `error`. +- Optional fields: `summary`, `type`, `metadata` (object), `environment` (string or object with `name`). + +## Example +```bash +curl -X POST https://your-deployment.vercel.app/api/report-error \ + -H "Content-Type: application/json" \ + -d '{"error":"Search job failed","type":"search","metadata":{"account":"user@contoso.com"}}' +``` diff --git a/docs/getting-started.md b/docs/getting-started.md deleted file mode 100644 index c9dc78c..0000000 --- a/docs/getting-started.md +++ /dev/null @@ -1,1512 +0,0 @@ -# ๐Ÿš€ Getting Started# ๐Ÿš€ Getting Started# ๐Ÿš€ Getting Started Guide
- - - -
- - - -**Complete guide to set up and run Microsoft Rewards Bot****Complete step-by-step guide to set up and run Microsoft Rewards Bot** - - - -*From zero to earning points in 10 minutes* - - - -[โ† Back to Documentation](index.md)[โ† Back to Documentation](index.md)Complete step-by-step tutorial to set up and run Microsoft Rewards Bot.Microsoft Rewards Script Logo - - - -
- - - ------- - - - -## ๐Ÿ“‹ Table of Contents - - - -1. [Requirements](#-requirements)## ๐Ÿ“‹ Table of Contents---# ๐Ÿš€ Getting Started - -2. [Installation](#-installation) - -3. [Account Setup](#-account-setup) - -4. [Configuration](#-configuration) - -5. [First Run](#-first-run)1. [Prerequisites](#-prerequisites) - -6. [Next Steps](#-next-steps) - -7. [Troubleshooting](#-troubleshooting)2. [Get the Project](#-get-the-project) - - - ----3. [Create Accounts](#-create-accounts)## ๐Ÿ“‹ Table of Contents**๐ŸŽฏ From zero to earning Microsoft Rewards points in minutes** - - - -## โœ… Requirements4. [Configuration](#-configuration) - - - -Before starting, you need:5. [First Run](#-first-run)*Complete setup guide for beginners* - - - -### 1. Node.js 20 or Higher6. [What's Next](#-whats-next) - - - -- **Download:** https://nodejs.org/ (get the LTS version)1. [Prerequisites](#-prerequisites) - -- **Verify installation:** - - ```bash--- - - node --version - - ```2. [Get the Project](#-get-the-project)
- - Should show `v20.x.x` or `v22.x.x` - -## โœ… Prerequisites - -### 2. Microsoft Accounts - -3. [Create Microsoft Accounts](#-create-microsoft-accounts) - -- At least **one Microsoft account** (Outlook/Hotmail email) - -- If you don't have one, see [Creating New Accounts](#creating-new-accounts-bonus)Before starting, you need: - - - -### 3. Git (Optional)4. [Configuration](#-configuration)--- - - - -- **Download:** https://git-scm.com/### 1. Node.js 20 or Higher - -- **Alternative:** Download project as ZIP from GitHub - -5. [First Run](#-first-run) - ---- - -- **Download:** https://nodejs.org/ - -## ๐Ÿ“ฆ Installation - -- **Recommended:** Version 226. [Troubleshooting](#-troubleshooting)## โœ… Requirements - -### Option 1: Git Clone (Recommended) - -- **Verify installation:** - -```bash - -git clone https://github.com/LightZirconite/Microsoft-Rewards-Bot.git ```bash - -cd Microsoft-Rewards-Bot - -npm install node --version - -``` - - ```---- **Node.js 18+** (22 recommended) โ€” [Download here](https://nodejs.org/) - -### Option 2: Download ZIP - - Should show `v20.x.x` or higher - -1. Go to: https://github.com/LightZirconite/Microsoft-Rewards-Bot - -2. Click **Code** โ†’ **Download ZIP**- **Microsoft accounts** with email + password - -3. Extract the ZIP file - -4. Open a terminal in the extracted folder### 2. Git (Optional but Recommended) - -5. Run: `npm install` - -## โœ… Prerequisites- **Optional:** Docker for containerized deployment - -**Installation takes 2-3 minutes** to download dependencies. - -- **Download:** https://git-scm.com/ - ---- - -- **Alternative:** Download project as ZIP from GitHub - -## ๐ŸŽฏ Account Setup - - - -You have **two options** for setting up accounts: - -### 3. Your Referral LinkBefore starting, you need:--- - -### Option A: Setup Wizard (Easiest) - - - -Run the interactive setup wizard: - -**๐Ÿ’ฐ Important: You earn 7,500 points per month for each account you refer!** - -```bash - -# Windows - -setup\setup.bat - -1. Log into your **main Microsoft account**1. **Node.js 20+** (version 22 recommended)## โšก Quick Setup (Recommended) - -# Linux/Mac/WSL - -bash setup/setup.sh2. Go to: https://rewards.bing.com/referandearn/ - - - -# Or via npm3. Copy your referral link (format: `https://rewards.bing.com/welcome?rh=XXXXX`) - Download: https://nodejs.org/ - -npm run setup - -``` - - - -The wizard will:--- - Verify: `node --version` should show v20 or higher
- -- โœ… Create `src/accounts.jsonc` from template - -- โœ… Guide you through adding your Microsoft account(s) - -- โœ… Build the TypeScript project - -- โœ… Verify everything works## ๐Ÿ“ฆ Get the Project - - - -### Option B: Manual Setup - - - -1. **Copy the template:**### Option 1: Git Clone (Recommended)2. **Git** (optional, but recommended)### **๐ŸŽฌ One Command, Total Automation** - - ```bash - - # Windows - - copy src\accounts.example.jsonc src\accounts.jsonc - - ```bash - Download: https://git-scm.com/ - - # Linux/Mac - - cp src/accounts.example.jsonc src/accounts.jsoncgit clone https://github.com/LightZirconite/Microsoft-Rewards-Bot.git - - ``` - -cd Microsoft-Rewards-Bot - Or download project as ZIP
- -2. **Edit `src/accounts.jsonc`:** - - ```jsonc``` - - { - - "accounts": [ - - { - - "email": "your@email.com",### Option 2: Download ZIP - - "password": "your_password", - - "recoveryEmail": "backup@gmail.com", // Optional but recommended3. **A main Microsoft account** (your personal account)```bash - - "totp": "", // Leave empty for now - - "enabled": true1. Visit: https://github.com/LightZirconite/Microsoft-Rewards-Bot - - } - - ]2. Click **Code** โ†’ **Download ZIP** - Go to https://rewards.bing.com/referandearn/# ๐ŸชŸ Windows - - } - - ```3. Extract the ZIP file - - - -3. **Build the project:**4. Open a terminal in the extracted folder - Copy your referral link (looks like: `https://rewards.bing.com/welcome?rh=XXXX`)setup/setup.bat - - ```bash - - npm run build - - ``` - -### Install Dependencies - **Why?** You earn **7,500 points per month** for each referral! - -**๐Ÿ“– Need 2FA/TOTP?** See [Accounts & 2FA Guide](accounts.md) for detailed setup. - - - ---- - -```bash# ๐Ÿง Linux/macOS/WSL - -## ๐Ÿ†• Creating New Accounts (Bonus) - -npm i - -**๐Ÿ’ฐ Important:** You earn **7,500 bonus points per month** for each account created with your referral link! - -```---bash setup/setup.sh - -### Step 1: Get Your Referral Link - - - -1. Log into your **main Microsoft account** - -2. Go to: https://rewards.bing.com/referandearn/This installs all required packages (~2-3 minutes). - -3. Copy your referral URL (format: `https://rewards.bing.com/welcome?rh=XXXXX`) - - - -### Step 2: Create Account with Bot - ----## ๐Ÿ“ฆ Get the Project# ๐ŸŒ Any platform - -**Recommended command** (full automation with 2FA): - - - -```bash - -npm run creator https://rewards.bing.com/welcome?rh=YOUR_CODE -y backup@gmail.com## ๐ŸŽฏ Create Accountsnpm run setup - -``` - - - -**Replace:** - -- `YOUR_CODE` โ†’ Your actual referral code### Why Use the Account Creator?### Option 1: Git Clone (Recommended)``` - -- `backup@gmail.com` โ†’ Your real recovery email - - - -**What this does:** - -1. โœ… Creates realistic Microsoft account (email, password, name, birthdate)- โœ… **Earn 7,500 bonus points** per month per referral - -2. โœ… Enrolls in Microsoft Rewards using YOUR referral - -3. โœ… Adds recovery email for account security- โœ… Creates realistic accounts (avoids detection) - -4. โœ… Enables 2FA with TOTP (Google Authenticator) - -5. โœ… Saves everything to `accounts-created/` folder- โœ… Automatic enrollment in Microsoft Rewards```bash**That's it!** The wizard will: - - - -### Step 3: Complete CAPTCHA- โœ… Built-in 2FA security with TOTP - - - -During creation:- โœ… Saves all account details for yougit clone https://github.com/LightZirconite/Microsoft-Rewards-Bot.git- โœ… Help you create `src/accounts.json` with your Microsoft credentials - -1. **CAPTCHA**: Browser will pause - solve it manually - -2. **Recovery Email**: Check your email, enter the 6-digit code - -3. **2FA Setup**: Scan QR code with Google Authenticator app - -4. **Done**: Account details saved automatically!### Step 1: Get Your Referral Linkcd Microsoft-Rewards-Bot- โœ… Install all dependencies automatically - - - -### Step 4: Find Your Account Info - - - -After creation, find the file in:If you haven't already:```- โœ… Build the TypeScript project - -``` - -accounts-created/account_USERNAME_TIMESTAMP.jsonc1. Log into your main Microsoft account - -``` - -2. Visit: https://rewards.bing.com/referandearn/- โœ… Start earning points immediately - -Example content: - -```jsonc3. Copy the referral URL - -{ - - "email": "john.smith1995@outlook.com",### Option 2: Download ZIP - - "password": "Xyz789!@#AbcDef", - - "firstName": "John",### Step 2: Create Account - - "lastName": "Smith", - - "birthdate": {--- - - "day": 15, - - "month": 6,**Recommended command (full automation):** - - "year": 1995 - - },1. Go to: https://github.com/LightZirconite/Microsoft-Rewards-Bot - - "referralUrl": "https://rewards.bing.com/welcome?rh=YOUR_CODE", - - "recoveryEmail": "backup@gmail.com",```bash - - "totpSecret": "JBSWY3DPEHPK3PXP", - - "recoveryCode": "MWGR3-9MJC9-STK76-SZCE5-X77PR"npm run creator https://rewards.bing.com/welcome?rh=YOUR_CODE -y backup@gmail.com2. Click **Code** โ†’ **Download ZIP**## ๐Ÿ› ๏ธ Manual Setup - -} - -`````` - - - -**โš ๏ธ KEEP THIS FILE SAFE!**3. Extract the ZIP file - -- `totpSecret` โ†’ Required for bot login (2FA) - -- `recoveryCode` โ†’ Emergency account recovery**Replace:** - -- `birthdate` โ†’ Needed if account gets suspended - -- `YOUR_CODE` โ†’ Your actual referral code4. Open terminal in the extracted folder
- -**๐Ÿ“– More details:** [Account Creator Full Guide](../src/account-creation/README.md) - -- `backup@gmail.com` โ†’ Your real recovery email - ---- - -๐Ÿ“– Prefer step-by-step? Click here - -## โš™๏ธ Configuration - -**What this does:** - -The bot works **great with default settings**, but you can customize it: - -1. Creates realistic Microsoft account (email, password, name, birthdate)### Install Dependencies - -### Essential Settings - -2. Enrolls in Microsoft Rewards using YOUR referral - -Open `src/config.jsonc` and review these: - -3. Adds recovery email for account security### 1๏ธโƒฃ **Configure Your Accounts** - -```jsonc - -{4. Enables 2FA with TOTP (Google Authenticator) - - "humanization": { - - "enabled": true, // โš ๏ธ ALWAYS keep this true!5. Saves everything to `accounts-created/` folder```bash```bash - - "stopOnBan": true // Stop if ban detected - - }, - - "workers": { - - "doDesktopSearch": true, // Desktop Bing searches### Step 3: Complete CAPTCHA & Verificationnpm icp src/accounts.example.json src/accounts.json - - "doMobileSearch": true, // Mobile Bing searches - - "doDailySet": true, // Daily activities - - "doMorePromotions": true, // Promotional offers - - "doPunchCards": true // Multi-day challengesDuring creation:```# Edit accounts.json with your Microsoft credentials - - } - -} - -``` - -1. **CAPTCHA**: Browser will pause - solve it manually (required by Microsoft)``` - -### Optional: Enable Scheduling - -2. **Recovery Email**: Check your email, enter the 6-digit code - -For **automatic daily runs**: - -3. **2FA Setup**: This will install all required packages. - -```jsonc - -{ - Open Google Authenticator app on your phone - - "scheduling": { - - "enabled": true, - Scan the QR code shown in browser### 2๏ธโƒฃ **Install Dependencies & Build** - - "type": "auto", - - "cron": { - Enter the 6-digit code from the app - - "schedule": "0 9 * * *" // Daily at 9 AM (Linux/Mac/Raspberry Pi) - - },4. **Done**: Account saved automatically!---```bash - - "taskScheduler": { - - "schedule": "09:00" // Daily at 9:00 (Windows) - - } - - }### Step 4: Find Your Account Infonpm install - -} - -``` - - - -**How it works:**After creation, a file is created in:## ๐ŸŽฏ Create Microsoft Accountsnpm run build - -- Run `npm start` once - -- Bot automatically schedules itself``` - -- Runs every day at your chosen time - -- Perfect for Raspberry Pi!accounts-created/account_USERNAME_TIMESTAMP.jsonc``` - - - -**๐Ÿ“– More options:** [Configuration Guide](config.md) | [Scheduling Guide](schedule.md)``` - - - ----**โš ๏ธ IMPORTANT: Use the account creator with YOUR referral link to earn 7,500 points per account per month!** - - - -## ๐ŸŽฎ First RunExample content: - - - -### Manual Run```jsonc### 3๏ธโƒฃ **Choose Your Mode** - - - -```bash{ - -npm start - -``` "email": "john.smith1995@outlook.com",### Step 1: Get Your Referral Link```bash - - - -**What happens:** "password": "Xyz789!@#AbcDef", - -1. Bot logs into each enabled account - -2. Completes desktop searches (~30 searches) "birthdate": {# Single run (test it works) - -3. Completes mobile searches (~20 searches) - -4. Does daily activities (quizzes, polls) "day": 15, - -5. Completes promotional offers - -6. Shows summary of points earned "month": 6,1. Log into your **main Microsoft account**npm start - - - -### With Scheduling "year": 1995 - - - -If you enabled scheduling: },2. Go to: https://rewards.bing.com/referandearn/ - -```bash - -npm start "firstName": "John", - -``` - - "lastName": "Smith",3. Copy your referral link (format: `https://rewards.bing.com/welcome?rh=YOUR_CODE`)# Schedule it (Task Scheduler, cron, etc.) - -The bot will: - -- Run immediately once "createdAt": "2025-11-09T10:30:00.000Z", - -- **Automatically schedule future runs** (daily) - -- No need to run manually again! "referralUrl": "https://rewards.bing.com/welcome?rh=YOUR_CODE",# See docs/schedule.md for examples - - - ---- "recoveryEmail": "backup@gmail.com", - - - -## ๐Ÿ”ง Next Steps "totpSecret": "JBSWY3DPEHPK3PXP",### Step 2: Create Accounts``` - - - -Now that you're set up, explore these features: "recoveryCode": "MWGR3-9MJC9-STK76-SZCE5-X77PR" - - - -### High Priority} - - - -| Guide | Why Important |``` - -|-------|---------------| - -| **[Accounts & 2FA](accounts.md)** | Set up TOTP for secure automation |**Recommended command** (enables everything):
- -| **[Scheduling](schedule.md)** | Automate with Task Scheduler or cron | - -**โš ๏ธ KEEP THIS FILE SAFE!** - -### Medium Priority - -- `totpSecret` โ†’ Required for bot login (2FA) - -| Guide | Why Useful | - -|-------|------------|- `recoveryCode` โ†’ Emergency account recovery - -| **[Notifications](notifications.md)** | Get alerts on your phone | - -| **[Dashboard](../src/dashboard/README.md)** | Monitor accounts in real-time |- `birthdate` โ†’ Needed if account gets suspended```bash--- - - - -### Optional- All info โ†’ Needed to restore account if banned - - - -| Guide | When Needed |npm run creator https://rewards.bing.com/welcome?rh=YOUR_CODE -y backup@gmail.com - -|-------|-------------| - -| **[Proxy Setup](proxy.md)** | Enhanced privacy |### Alternative: Without 2FA (Not Recommended) - -| **[Docker](docker.md)** | Containerized deployment | - -```## ๐ŸŽฏ What Happens Next? - ---- - -If you don't want 2FA: - -## โ“ Troubleshooting - - - -### "Account credentials are invalid" - -```bash - -**Problem**: Wrong email/password or missing TOTP - -npm run creator https://rewards.bing.com/welcome?rh=YOUR_CODE**Replace:**The script will automatically: - -**Solution**: - -1. Check `src/accounts.jsonc` has correct credentials``` - -2. If 2FA enabled, make sure `totp` field has the secret - -3. Test login manually: https://login.live.com/- `YOUR_CODE` with your actual referral code- ๐Ÿ” **Search Bing** for points (desktop + mobile) - - - -### "Ban detected" or "Account suspended"Then answer "n" when asked about 2FA setup. - - - -**Problem**: Microsoft detected automation- `backup@gmail.com` with your real recovery email- ๐Ÿ“… **Complete daily sets** (quizzes, polls, activities) - - - -**Solutions**:--- - -- โœ… Always keep `humanization.enabled: true` - -- โœ… Don't run bot multiple times per day- ๐ŸŽ **Grab promotions** and bonus opportunities - -- โœ… Use proxies (see [Proxy Guide](proxy.md)) - -- โœ… Start with 1-2 accounts to test## โš™๏ธ Configuration - - - -**Account Recovery**:**What this does:**- ๐Ÿƒ **Work on punch cards** (multi-day challenges) - -- Use `birthdate` from `accounts-created/` file - -- Use `recoveryCode` if you can't login### Step 1: Setup Accounts File - - - -### "Browser launch failed"1. โœ… Creates a realistic Microsoft account (email, password, name, birthdate)- โœ… **Daily check-ins** for easy points - - - -**Solution:**You have 2 options: - -```bash - -npx playwright install chromium2. โœ… Enrolls in Microsoft Rewards using YOUR referral link- ๐Ÿ“š **Read articles** for additional rewards - -``` - -#### Option A: Setup Wizard (Easiest) - -### "Module not found" errors - -3. โœ… Adds recovery email for account security - -**Solution:** - -```bash```bash - -npm install - -npm run buildnpm run setup4. โœ… Enables 2FA with TOTP (Google Authenticator)**All while looking completely natural to Microsoft!** ๐Ÿค– - -``` - -``` - -### Setup Script Issues - -5. โœ… Saves everything to `accounts-created/` folder - -**Windows (if PowerShell blocks scripts):** - -```powershellThe wizard will: - -# Run as Administrator - -Set-ExecutionPolicy RemoteSigned -Scope CurrentUser- Create `src/accounts.jsonc` from template--- - -.\setup\setup.bat - -```- Guide you through configuration - - - -**Linux/Mac (if permission denied):**- Build the project automatically### Step 3: CAPTCHA & Verification - -```bash - -chmod +x setup/setup.sh - -bash setup/setup.sh - -```**On Windows:**## ๐Ÿณ Docker Alternative - - - -**๐Ÿ“– More help:** [Troubleshooting Guide](troubleshooting.md)```powershell - - - ----setup\setup.batDuring account creation: - - - -## ๐ŸŽฏ Best Practices``` - - - -1. โœ… **Use referral links** โ€” Earn 7,500 extra points per account per monthIf you prefer containers: - -2. โœ… **Enable 2FA** โ€” Protects accounts from theft - -3. โœ… **Keep humanization ON** โ€” Reduces ban risk significantly**On Linux/Mac:** - -4. โœ… **Run once per day** โ€” Don't over-automate - -5. โœ… **Save account files** โ€” Keep `accounts-created/` folder safe```bash1. **CAPTCHA**: The browser will pause - solve it manually - -6. โœ… **Use recovery email** โ€” Helps recover suspended accounts - -7. โœ… **Monitor logs** โ€” Watch for ban warningsbash setup/setup.sh - -8. โœ… **Start small** โ€” Test with 1-2 accounts first - -```2. **Recovery Email**: Check your email, enter the verification code```bash - ---- - - - -## ๐Ÿ†˜ Still Need Help? - -#### Option B: Manual Setup3. **2FA Setup**: Scan the QR code with Google Authenticator app# Ensure accounts.json and config.json exist - -- ๐Ÿ’ฌ **[Join Discord](https://discord.gg/k5uHkx9mne)** โ€” Community support - -- ๐Ÿ“– **[Documentation Hub](index.md)** โ€” All guides - -- ๐Ÿ› **[Report Issue](https://github.com/LightZirconite/Microsoft-Rewards-Bot/issues)** โ€” Found a bug? - -1. **Copy the template:**4. **Complete**: Account details saved automaticallydocker compose up -d - ---- - - ```bash - -
- - # Windows - -**Happy farming! ๐ŸŽ‰** - - copy src\accounts.example.jsonc src\accounts.jsonc - -[โ† Back to Documentation](index.md) - - ### Step 4: Find Your Account Info# Follow logs - -
- - # Linux/Mac - - cp src/accounts.example.jsonc src/accounts.jsoncdocker logs -f microsoft-rewards-bot - - ``` - -After creation, check:``` - -2. **Open `src/accounts.jsonc` in text editor** - -``` - -3. **Fill in account details:** - - ```jsoncaccounts-created/account_USERNAME_TIMESTAMP.jsonc**[Full Docker Guide โ†’](./docker.md)** - - { - - "accounts": [``` - - { - - "email": "john.smith1995@outlook.com", // From accounts-created/ file--- - - "password": "Xyz789!@#AbcDef", // From accounts-created/ file - - "totp": "JBSWY3DPEHPK3PXP", // โš ๏ธ REQUIRED if 2FA enabled!Example file content: - - "enabled": true // Set to true - - }```jsonc## ๐Ÿ”ง Next Steps - - ] - - }{ - - ``` - - "email": "john.smith1995@outlook.com",Once running, explore these guides: - -4. **Copy info from `accounts-created/` folder** - - "password": "Xyz789!@#AbcDef", - - For each account you created: - - - Copy `email` "birthdate": {| Priority | Guide | Why Important | - - - Copy `password` - - - Copy `totpSecret` โ†’ Put in `totp` field "day": 15,|----------|-------|---------------| - - - Set `enabled: true` - - "month": 6,| **High** | **[Accounts & 2FA](./accounts.md)** | Set up TOTP for secure automation | - -5. **Save the file** - - "year": 1995| **High** | **[External Scheduling](./schedule.md)** | Automate with Task Scheduler or cron | - -### Step 2: Configure Bot Settings - - },| **Medium** | **[Notifications](./ntfy.md)** | Get alerts on your phone | - -Open `src/config.jsonc`: - - "firstName": "John",| **Low** | **[Humanization](./humanization.md)** | Advanced anti-detection | - -#### Enable Automatic Scheduling (Recommended) - - "lastName": "Smith", - -```jsonc - -{ "createdAt": "2025-11-09T10:30:00.000Z",--- - - "scheduling": { - - "enabled": true, "referralUrl": "https://rewards.bing.com/welcome?rh=YOUR_CODE", - - "type": "auto", - - "cron": { "recoveryEmail": "backup@gmail.com",## ๐Ÿ†˜ Need Help? - - "schedule": "0 9 * * *" // Daily at 9 AM (Linux/Mac/Raspberry Pi) - - }, "totpSecret": "JBSWY3DPEHPK3PXP", - - "taskScheduler": { - - "schedule": "09:00" // Daily at 9:00 (Windows) "recoveryCode": "MWGR3-9MJC9-STK76-SZCE5-X77PR"**Script not starting?** โ†’ [Troubleshooting Guide](./diagnostics.md) - - } - - }}**Login issues?** โ†’ [Accounts & 2FA Setup](./accounts.md) - -} - -``````**Want Docker?** โ†’ [Container Guide](./docker.md) - - - -**How it works:** - -- Run `npm start` once - -- Bot automatically schedules itself**โš ๏ธ IMPORTANT: Keep this file safe!****Found a bug?** [Report it here](https://github.com/LightZirconite/Microsoft-Rewards-Bot/issues) - -- Runs every day at your chosen time - -- Perfect for Raspberry Pi!- `totpSecret`: Needed for 2FA login (bot uses this)**Need support?** [Join our Discord](https://discord.gg/k5uHkx9mne) - - - -**See [Scheduling Guide](schedule.md) for details**- `recoveryCode`: Emergency account recovery - - - -#### Notifications (Optional)- `birthdate`: Needed if Microsoft suspends account--- - - - -Get notified when bot finishes:- `password`: Keep it safe! - - - -**Discord Webhook:**## ๐Ÿ”— Related Guides - -```jsonc - -{### Without 2FA (Not Recommended) - - "conclusionWebhook": { - - "enabled": true,- **[Accounts & 2FA](./accounts.md)** โ€” Add Microsoft accounts with TOTP - - "webhookUrl": "https://discord.com/api/webhooks/YOUR_WEBHOOK" - - }If you don't want 2FA, just omit `-y`:- **[Docker](./docker.md)** โ€” Deploy with containers - -} - -```- **[External Scheduling](./schedule.md)** โ€” Automate daily execution - - - -**NTFY Push Notifications:**```bash- **[Discord Webhooks](./conclusionwebhook.md)** โ€” Get run summaries - -```jsonc - -{npm run creator https://rewards.bing.com/welcome?rh=YOUR_CODE - - "ntfy": {``` - - "enabled": true, - - "topic": "your-unique-topic",Then answer "n" when asked about 2FA. - - "priority": 3 - - }--- - -} - -```## โš™๏ธ Configuration - - - -**See [Notifications Guide](conclusionwebhook.md) for setup**### Step 1: Setup Accounts File - - - -#### Important Settings#### Option A: Use Setup Wizard - - - -```jsonc```bash - -{# Windows - - "humanization": {setup\setup.bat - - "enabled": true, // โš ๏ธ ALWAYS keep true! - - "stopOnBan": true // Stop if ban detected# Linux/Mac - - },bash setup/setup.sh - - "workers": { - - "doDesktopSearch": true,# Or via npm - - "doMobileSearch": true,npm run setup - - "doDailySet": true,``` - - "doMorePromotions": true, - - "doPunchCards": trueThe wizard will: - - }1. Create `src/accounts.jsonc` from template - -}2. Ask you to fill in account details - -```3. Compile the project - - - -**See [Configuration Guide](config.md) for all options**#### Option B: Manual Setup - - - -### Step 3: Build the Project1. Copy the template: - - ```bash - -```bash # Windows - -npm run build copy src\accounts.example.jsonc src\accounts.jsonc - -``` - - # Linux/Mac - -Or skip if you used the setup wizard (it builds automatically). cp src/accounts.example.jsonc src/accounts.jsonc - - ``` - ---- - -2. Open `src/accounts.jsonc` in a text editor - -## ๐ŸŽฎ First Run - -3. Fill in your account(s): - -### Manual Run ```jsonc - - { - -```bash "accounts": [ - -npm start { - -``` "email": "john.smith1995@outlook.com", // From accounts-created/ file - - "password": "Xyz789!@#AbcDef", // From accounts-created/ file - -**What happens:** "totp": "JBSWY3DPEHPK3PXP", // โš ๏ธ REQUIRED if you enabled 2FA! - -1. Bot logs into each enabled account "enabled": true // Set to true to activate - -2. Completes desktop searches (30+) } - -3. Completes mobile searches (20+) ] - -4. Does daily activities (quizzes, polls) } - -5. Completes promotional offers ``` - -6. Shows summary of points earned - -4. **For each account you created**, copy the info from `accounts-created/` folder - -### With Automatic Scheduling - -5. Save the file - -If you enabled scheduling in config: - -### Step 2: Configure Bot Settings (Optional) - -```bash - -npm startOpen `src/config.jsonc` and adjust settings: - -``` - -#### Scheduling (Recommended) - -The bot will: - -- Run immediately once```jsonc - -- Automatically schedule future runs{ - -- Run daily at your chosen time "scheduling": { - -- No need to run manually again! "enabled": true, // Enable automatic scheduling - - "type": "auto", // Auto-detect OS - -### Monitoring "cron": { - - "schedule": "0 9 * * *" // Run daily at 9 AM (Linux/Mac/Raspberry Pi) - -Watch the console output to see: }, - -- Login status "taskScheduler": { - -- Search queries "schedule": "09:00" // Run daily at 9:00 (Windows) - -- Activities completed } - -- Points earned } - -- Ban warnings (if any)} - -``` - ---- - -**How it works:** - -## ๐ŸŽฏ What's Next- Set `enabled: true` - -- Run `npm start` once - -### Optional: Enable Dashboard- Bot will automatically run every day at the scheduled time - -- Perfect for Raspberry Pi or always-on PC! - -Add to `src/config.jsonc`: - -```jsonc#### Notifications (Optional) - -{ - - "dashboard": {Get notified when bot finishes: - - "enabled": true, - - "port": 3000**Discord Webhook:** - - }```jsonc - -}{ - -``` "conclusionWebhook": { - - "enabled": true, - -Then access: http://localhost:3000 "webhookUrl": "https://discord.com/api/webhooks/YOUR_WEBHOOK_URL" - - } - -**See [Dashboard Guide](../src/dashboard/README.md)**} - -``` - -### Optional: Setup Proxies - -**NTFY Push Notifications:** - -For each account, add proxy in `accounts.jsonc`:```jsonc - -```jsonc{ - -{ "ntfy": { - - "email": "...", "enabled": true, - - "password": "...", "topic": "your-unique-topic", - - "proxy": { "priority": 3 - - "url": "proxy.example.com", } - - "port": 8080,} - - "username": "user",``` - - "password": "pass" - - }See [Notifications Guide](conclusionwebhook.md) for setup instructions. - -} - -```#### Other Important Settings - - - -**See [Proxy Guide](proxy.md)**```jsonc - -{ - -### Create More Accounts "search": { - - "useLocalQueries": false, // Use Google Trends (recommended) - -Repeat the account creation process: "settings": { - -```bash "useGeoLocaleQueries": true // Use account country (FR, DE, etc.) - -npm run creator https://rewards.bing.com/welcome?rh=YOUR_CODE -y backup@gmail.com } - -``` }, - - "humanization": { - -Each account earns YOU 7,500 bonus points per month! "enabled": true, // โš ๏ธ ALWAYS keep this true! - - "stopOnBan": true // Stop if ban detected - ---- }, - - "workers": { - -## โ“ Troubleshooting "doDesktopSearch": true, // Desktop searches - - "doMobileSearch": true, // Mobile searches - -### "Account credentials are invalid" "doDailySet": true, // Daily activities - - "doMorePromotions": true, // Promotional offers - -**Cause:** Wrong email/password or missing TOTP "doPunchCards": true // Multi-day challenges - - } - -**Solution:**} - -1. Check `src/accounts.jsonc` has correct credentials``` - -2. If 2FA enabled, make sure `totp` field has the secret - -3. Test login manually: https://login.live.com/### Step 3: Build the Project - - - -### "Ban detected" or "Account suspended"```bash - -npm run build - -**Cause:** Microsoft detected automation``` - - - -**Solutions:**Or if you used the setup wizard, it already did this for you. - -- Always keep `humanization.enabled: true` - -- Don't run bot multiple times per day--- - -- Use proxies (see [Proxy Guide](proxy.md)) - -- Start with 1-2 accounts to test## ๐ŸŽฎ First Run - - - -**Recovery:**### Manual Run - -- Use `birthdate` from `accounts-created/` file - -- Use `recoveryCode` if can't login```bash - -- Contact Microsoft with account creation datenpm start - -``` - -### "Browser launch failed" - -The bot will: - -**Solution:**1. โœ… Log into each enabled account - -```bash2. โœ… Complete desktop searches (30+) - -npx playwright install chromium3. โœ… Complete mobile searches (20+) - -```4. โœ… Do daily activities (quizzes, polls) - -5. โœ… Complete promotional offers - -### "Module not found"6. โœ… Show summary of earned points - - - -**Solution:**### With Scheduling (Recommended) - -```bash - -npm iIf you enabled scheduling in config: - -npm run build - -``````bash - -npm start - -### More Help``` - - - -- ๐Ÿ“– [Configuration Reference](config-reference.md)Then the bot will: - -- ๐Ÿ“– [Diagnostics Guide](diagnostics.md)- Run immediately once - -- ๐Ÿ“– [Accounts & 2FA](accounts.md)- **Automatically schedule future runs** (daily at your chosen time) - -- ๐Ÿ’ฌ [Join Discord](https://discord.gg/k5uHkx9mne)- You don't need to run it again manually! - - - ----Perfect for Raspberry Pi or always-on systems. - - - -## ๐ŸŽฏ Best Practices--- - - - -1. **Use referral links** โ€” 7,500 extra points per account## ๐Ÿ” Monitoring - -2. **Enable 2FA** โ€” Protects accounts - -3. **Keep humanization ON** โ€” Reduces ban risk### Real-time Logs - -4. **Run once per day** โ€” Don't overuse - -5. **Save account files** โ€” Keep `accounts-created/` safeWatch the console output to see: - -6. **Monitor logs** โ€” Watch for warnings- Login status for each account - -7. **Start small** โ€” Test with 1-2 accounts- Search queries being performed - -- Activities completed - ----- Points earned - -- Ban warnings (if any) - -## ๐Ÿ“š Related Documentation - -### Dashboard (Optional) - -- [Configuration Guide](config.md) - -- [Account Creator Details](../src/account-creation/README.md)Enable the web dashboard: - -- [Dashboard Guide](../src/dashboard/README.md) - -- [Scheduling Setup](schedule.md)```jsonc - -- [Docker Deployment](docker.md){ - -- [Troubleshooting](diagnostics.md) "dashboard": { - - "enabled": true, - ---- "port": 3000 - - } - -[โ† Back to Documentation](index.md)} - -``` - -Then access: http://localhost:3000 - -Features: -- Real-time account status -- Live log streaming -- Manual sync buttons -- Configuration editor -- Historical metrics - ---- - -## โ“ Troubleshooting - -### "Account credentials are invalid" - -**Problem**: Wrong email/password or missing TOTP - -**Solution**: -1. Check `src/accounts.jsonc` has correct email and password -2. If you enabled 2FA, make sure `totp` field has the secret from `accounts-created/` file -3. Test login manually at https://login.live.com/ - -### "Ban detected" or "Account suspended" - -**Problem**: Microsoft detected automation - -**Solutions**: -- โœ… Always keep `humanization.enabled: true` in config -- โœ… Don't run the bot multiple times per day -- โœ… Use different proxies for each account (see [Proxy Guide](proxy.md)) -- โœ… Start with 1-2 accounts to test - -**Account Recovery**: -- Use the `birthdate` from `accounts-created/` file -- Use the `recoveryCode` if you can't login -- Contact Microsoft support with account creation date - -### "Browser launch failed" - -**Problem**: Chromium not installed or missing system dependencies - -**Solution**: - -**Windows/Mac:** -```bash -npx playwright install chromium -``` - -**Linux (Ubuntu/Debian):** -```bash -# Install Chromium + system dependencies -npx playwright install-deps chromium -npx playwright install chromium - -# Alternative manual installation: -sudo apt-get install -y \ - libnss3 \ - libnspr4 \ - libatk1.0-0 \ - libatk-bridge2.0-0 \ - libcups2 \ - libdrm2 \ - libxkbcommon0 \ - libxcomposite1 \ - libxdamage1 \ - libxfixes3 \ - libxrandr2 \ - libgbm1 \ - libasound2 -``` - -**Linux (Other distributions):** -```bash -# Red Hat/CentOS/Fedora -sudo yum install -y atk cups-libs libXdamage libXrandr libgbm alsa-lib - -# Arch -sudo pacman -S nss atk cups libdrm libxkbcommon libxcomposite libxdamage libxfixes libxrandr alsa-lib -``` - -### "Module not found" errors - -**Problem**: Dependencies not installed - -**Solution**: -```bash -npm i -npm run build -``` - -### Setup Script Not Working - -**Windows:** -```powershell -# Run as Administrator -Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -.\setup\setup.bat -``` - -**Linux/Mac:** -```bash -chmod +x setup/setup.sh -bash setup/setup.sh -``` - -### More Help - -- ๐Ÿ“– [Configuration Reference](config-reference.md) -- ๐Ÿ“– [Accounts & 2FA](accounts.md) -- ๐Ÿ“– [Proxy Setup](proxy.md) -- ๐Ÿ“– [Diagnostics & Logs](diagnostics.md) -- ๐Ÿ’ฌ [Join Discord](https://discord.gg/k5uHkx9mne) - ---- - -## ๐ŸŽฏ Best Practices - -1. **Use referral links** - Earn 7,500 extra points per account per month -2. **Enable 2FA** - Protect accounts from being stolen -3. **Keep humanization ON** - Reduces ban risk -4. **Run once per day** - Don't over-automate -5. **Save account files** - Keep `accounts-created/` folder safe -6. **Use recovery email** - Helps recover suspended accounts -7. **Monitor logs** - Watch for ban warnings -8. **Start small** - Test with 1-2 accounts first - ---- - -## ๐Ÿš€ Next Steps - -Now that you're set up: - -1. โœ… Let the bot run once to see results -2. โœ… Check points earned on https://rewards.bing.com/ -3. โœ… Set up scheduling for automatic runs -4. โœ… Configure notifications to stay informed -5. โœ… Add more accounts with referrals (earn more points!) - -**Happy farming! ๐ŸŽ‰** - ---- - -## ๐Ÿ“š Related Documentation - -- [Configuration Guide](config.md) -- [Account Creator Full Guide](../src/account-creation/README.md) -- [Dashboard Guide](../src/dashboard/README.md) -- [Scheduling Setup](schedule.md) -- [Docker Deployment](docker.md) -- [Troubleshooting](diagnostics.md) diff --git a/docs/index.md b/docs/index.md index 0ad7c1c..0910743 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,215 +1,16 @@ -
- - - -Microsoft Rewards Bot Logo# ๐Ÿ“š Documentation - - - -# ๐Ÿ“š Documentation Hub**Complete guide for Microsoft Rewards Bot** - - - -**Complete guides for Microsoft Rewards Bot**[โ† Back to Main](../README.md) - - - -[โ† Back to Main](../README.md)
- - - -
--- - - - ----## ๐Ÿš€ Quick Start (3 Steps) - - - -## ๐Ÿš€ Getting Started1. **[Setup Accounts](accounts.md)** โ€” Add credentials + 2FA - -2. **[Configure Bot](config.md)** โ€” Essential settings - -**New to the bot?** Start with these guides in order:3. **[Schedule Runs](schedule.md)** โ€” Use OS-level automation - - - -| Step | Guide | What You'll Learn |**Done!** The bot will run automatically. - -|------|-------|-------------------| - -| **1** | **[๐Ÿ“˜ Getting Started](getting-started.md)** | Installation, account setup, first run |--- - -| **2** | **[๐Ÿ‘ค Accounts & 2FA](accounts.md)** | Add accounts, enable TOTP authentication | - -| **3** | **[โš™๏ธ Configuration](config.md)** | Customize bot behavior and features |## โœจ Feature Guides - -| **4** | **[โฐ Scheduling](schedule.md)** | Automate daily runs with cron/Task Scheduler | - -| Feature | Description | - -**That's all you need to get started!** The guides above cover everything for basic usage.|---------|-------------| - -| **[Configuration](config.md)** | All settings explained | - ----| **[External Scheduling](schedule.md)** | Automate with cron or Task Scheduler | - -| **[Humanization](humanization.md)** | Anti-detection system | - -## ๐Ÿ“– Feature Guides| **[Webhooks](conclusionwebhook.md)** | Discord notifications | - -| **[Error Reporting](ERROR_REPORTING.md)** | ๐Ÿ†• Automatic error reporting | - -Explore advanced features and customization options:| **[NTFY Alerts](ntfy.md)** | Mobile push notifications | - -| **[Proxy Setup](proxy.md)** | IP rotation (optional) | - -### Core Features - -| Guide | Description | -|-------|-------------| -| **[๐Ÿ”” Notifications](notifications.md)** | Discord webhooks and mobile push alerts | -| **[๐Ÿ“Š Dashboard](../src/dashboard/README.md)** | Web interface for monitoring and control | -| **[๐ŸŒ Proxy Setup](proxy.md)** | Configure proxies for privacy | -| **[๐Ÿค– Humanization](humanization.md)** | Anti-detection and natural behavior patterns | - -### Deployment - -| Guide | Description | -|-------|-------------| -| **[๐Ÿณ Docker](docker-deployment.md)** | Containerized deployment with Docker Compose | - -| **[โ˜๏ธ Cloud Deployment](cloud-deployment.md)** | Deploy to VPS, Raspberry Pi, or cloud services |**Need help?** โ†’ [Discord Community](https://discord.gg/k5uHkx9mne) - - - -### Advanced--- - - - -| Guide | Description |[โ† Back to Main](../README.md) - -|-------|-------------| -| **[๐Ÿ”ง Advanced Configuration](advanced-config.md)** | Power user settings and optimization | -| **[๐Ÿ›ก๏ธ Security Best Practices](security.md)** | Account protection and risk management | - ---- - -## ๐Ÿ†• Account Creator - -**Create new Microsoft accounts with the built-in account creator:** - -| Guide | Description | -|-------|-------------| -| **[๐ŸŽฏ Account Creator Guide](../src/account-creation/README.md)** | Create accounts with 2FA and referral links | -| **[๐Ÿ’ฐ Referral System](referrals.md)** | Earn 7,500 points/month per referral | - -**Quick command:** -```bash -npm run creator -- -y backup@gmail.com "https://rewards.bing.com/welcome?rh=YOUR_CODE" -``` - ---- - -## ๐Ÿ†˜ Help & Troubleshooting - -Having issues? Check these resources: - -### Common Issues - -| Problem | Solution | -|---------|----------| -| **Bot not starting** | [Troubleshooting Guide](troubleshooting.md) | -| **Login failures** | [Accounts & 2FA Setup](accounts.md#troubleshooting) | -| **Account banned** | [Security Guide](security.md) | -| **Configuration errors** | [Config Reference](config.md) | - -### Support Resources - -- ๐Ÿ’ฌ **[Discord Community](https://discord.gg/k5uHkx9mne)** โ€” Get help from the community -- ๐Ÿ› **[GitHub Issues](https://github.com/LightZirconite/Microsoft-Rewards-Bot/issues)** โ€” Report bugs -- ๐Ÿ“– **[FAQ](FAQ.md)** โ€” Frequently asked questions -- ๐Ÿ” **[Diagnostics Guide](diagnostics.md)** โ€” Debug and capture logs - ---- - -## ๐Ÿ“š Reference Documentation - -Technical references and detailed information: - -### Configuration - -| Document | Description | -|----------|-------------| -| **[Config Reference](config.md)** | Complete `config.jsonc` options | -| **[Accounts Reference](accounts.md)** | Complete `accounts.jsonc` schema | -| **[Environment Variables](environment-variables.md)** | Available env vars for CI/Docker | - -### Technical - -| Document | Description | -|----------|-------------| -| **[API Documentation](../src/dashboard/README.md)** | Dashboard REST API endpoints | -| **[Error Reporting](ERROR_REPORTING.md)** | Automatic error reporting system | -| **[Changelog](../CHANGELOG.md)** | Version history and changes | - ---- - -## ๐ŸŽ“ Guides by Topic - -### For Beginners - -1. [Getting Started](getting-started.md) โ€” Start here! -2. [Accounts & 2FA](accounts.md) โ€” Setup your accounts -3. [First Run](getting-started.md#-first-run) โ€” Test the bot -4. [Scheduling](schedule.md) โ€” Automate daily runs - -### For Raspberry Pi Users - -1. [Getting Started](getting-started.md) โ€” Installation steps -2. [Scheduling](schedule.md) โ€” Setup cron for daily runs -3. [Notifications](notifications.md) โ€” Get mobile alerts -4. [Cloud Deployment](cloud-deployment.md) โ€” Run 24/7 - -### For Docker Users - -1. [Docker Guide](docker-deployment.md) โ€” Setup Docker Compose -2. [Environment Variables](environment-variables.md) โ€” Configure via env vars -3. [Notifications](notifications.md) โ€” Monitor container runs - -### For Multiple Accounts - -1. [Accounts & 2FA](accounts.md) โ€” Manage multiple accounts -2. [Proxy Setup](proxy.md) โ€” Use different IPs per account -3. [Advanced Config](advanced-config.md) โ€” Parallel execution -4. [Referrals](referrals.md) โ€” Earn bonus points - ---- - -## ๐Ÿ”— External Resources - -- **[Microsoft Rewards](https://rewards.bing.com/)** โ€” Official Microsoft Rewards site -- **[Playwright Docs](https://playwright.dev/)** โ€” Browser automation framework -- **[Node.js](https://nodejs.org/)** โ€” JavaScript runtime -- **[TypeScript](https://www.typescriptlang.org/)** โ€” Programming language - ---- - -## ๐Ÿค Contributing - -Want to help improve the bot? - -- ๐Ÿ“– **[Contributing Guide](../CONTRIBUTING.md)** โ€” How to contribute -- ๐Ÿ› **[Report Bugs](https://github.com/LightZirconite/Microsoft-Rewards-Bot/issues)** โ€” Found an issue? -- ๐Ÿ’ก **[Feature Requests](https://github.com/LightZirconite/Microsoft-Rewards-Bot/issues)** โ€” Suggest new features -- ๐Ÿ“ **[Improve Docs](https://github.com/LightZirconite/Microsoft-Rewards-Bot/tree/main/docs)** โ€” Help with documentation - ---- - -
- -**Need help?** [Join our Discord](https://discord.gg/k5uHkx9mne) - -[โ† Back to Main](../README.md) - -
+# Microsoft Rewards Bot Docs + +This folder contains short, task-focused guides. Pick what you need and keep runs simple. + +- `setup.md` โ€” prerequisites and preparing account files. +- `running.md` โ€” commands to start the bot. +- `modes.md` โ€” what each mode does and when to use it. +- `configuration.md` โ€” adjust the core settings file. +- `account-creation.md` โ€” create new accounts safely. +- `dashboard.md` โ€” view progress in the web panel. +- `scheduling.md` โ€” automate runs on a schedule. +- `notifications.md` โ€” send alerts to Discord or other webhooks. +- `error-reporting.md` โ€” send structured error reports to Discord. +- `docker.md` โ€” run the bot in a container. +- `update.md` โ€” keep the project up to date. +- `troubleshooting.md` โ€” quick fixes for common issues. diff --git a/docs/modes.md b/docs/modes.md new file mode 100644 index 0000000..417df0b --- /dev/null +++ b/docs/modes.md @@ -0,0 +1,16 @@ +# Modes + +## What it does +Lists the main modes and when to pick them. + +## How to use +- **Default** โ€” run daily tasks once: `npm start`. +- **Dashboard** โ€” view progress in a web panel: `npm run dashboard` then open http://localhost:3000. +- **Dev** โ€” quick restarts while editing: `npm run dev`. +- **Account creation** โ€” create new accounts cautiously: `npm run creator`. +- **Docker** โ€” containerized run with scheduling: `npm run docker:compose`. + +## Example +```bash +npm run dashboard +``` diff --git a/docs/notifications.md b/docs/notifications.md index e945606..0726842 100644 --- a/docs/notifications.md +++ b/docs/notifications.md @@ -1,358 +1,15 @@ -# ๐Ÿ”” Notifications +# Notifications -**Get alerts when the bot completes its run** +## What it does +Sends run summaries and issues to your preferred webhook. -[โ† Back to Documentation](index.md) +## How to use +- Set `DISCORD_WEBHOOK_URL` in your environment for Discord alerts. +- Keep `humanization.enabled` true to avoid unsafe behavior in production. +- Start the bot normally; alerts send automatically when configured. ---- - -## ๐Ÿ“‹ Table of Contents - -- [Discord Webhooks](#-discord-webhooks) -- [NTFY Mobile Alerts](#-ntfy-mobile-alerts) -- [Comparison](#-comparison) -- [Examples](#-examples) - ---- - -## ๐Ÿ’ฌ Discord Webhooks - -Get detailed run summaries sent to your Discord server. - -### Setup - -#### 1. Create Webhook in Discord - -1. Open your Discord server -2. Go to **Server Settings** โ†’ **Integrations** โ†’ **Webhooks** -3. Click **New Webhook** -4. Name it (e.g., "Microsoft Rewards Bot") -5. Choose a channel -6. Click **Copy Webhook URL** - -#### 2. Add to Configuration - -Edit `src/config.jsonc`: - -```jsonc -{ - "conclusionWebhook": { - "enabled": true, - "webhookUrl": "https://discord.com/api/webhooks/123456789/AbCdEfGhIjKlMnOpQrStUvWxYz" - } -} -``` - -### What You'll Receive - -**Rich embeds with**: -- โœ… Total points earned -- ๐Ÿ“Š Per-account breakdown -- โฑ๏ธ Run duration -- ๐ŸŽฏ Completion status -- โš ๏ธ Errors and warnings - -**Example message**: -``` -๐ŸŽ‰ Microsoft Rewards Summary - -Total Points: 450 -Duration: 12 minutes -Accounts Processed: 3/3 - -โœ… account1@outlook.com: 150 points (45s) -โœ… account2@outlook.com: 150 points (48s) -โœ… account3@outlook.com: 150 points (42s) -``` - -### Advanced Options - -```jsonc -{ - "conclusionWebhook": { - "enabled": true, - "webhookUrl": "YOUR_WEBHOOK_URL", - "username": "Rewards Bot", // Custom bot name - "avatar": "https://example.com/avatar.png", // Custom avatar - "color": 3447003, // Embed color (decimal) - "onlyOnError": false, // Send only when errors occur - "pingOnError": true // @mention on errors - } -} -``` - -### Multiple Webhooks - -Send to different channels: - -```jsonc -{ - "conclusionWebhook": { - "enabled": true, - "webhookUrl": "WEBHOOK_FOR_SUCCESS", - "errorWebhookUrl": "WEBHOOK_FOR_ERRORS" // Separate channel for errors - } -} -``` - ---- - -## ๐Ÿ“ฑ NTFY Mobile Alerts - -Get **instant push notifications** on your phone with [ntfy.sh](https://ntfy.sh/). - -### Setup - -#### 1. Install NTFY App - -- **Android**: [Google Play Store](https://play.google.com/store/apps/details?id=io.heckel.ntfy) -- **iOS**: [App Store](https://apps.apple.com/us/app/ntfy/id1625396347) -- **Web**: https://ntfy.sh/app - -#### 2. Choose a Topic - -Pick a **unique topic name** (acts as your channel): -- Examples: `rewards-bot-john`, `msrewards-12345` -- Keep it secret to avoid spam! - -#### 3. Subscribe in App - -1. Open NTFY app -2. Tap **+** or **Subscribe** -3. Enter your topic name -4. Save - -#### 4. Add to Configuration - -Edit `src/config.jsonc`: - -```jsonc -{ - "ntfy": { - "enabled": true, - "topic": "your-unique-topic-name", // From step 2 - "priority": 3, // 1-5 (3 = default, 5 = urgent) - "tags": ["robot", "money"] // Optional emojis - } -} -``` - -### What You'll Receive - -**Simple push notifications**: -- โœ… Bot completion status -- ๐Ÿ“Š Total points earned -- โš ๏ธ Error alerts -- โฑ๏ธ Run duration - -**Example notification**: -``` -๐Ÿค– Rewards Bot Complete - -โœ… 3 accounts processed -๐Ÿ’ฐ 450 points earned -โฑ๏ธ 12 minutes -``` - -### Priority Levels - -| Priority | Behavior | When to Use | -|----------|----------|-------------| -| 1 | Min | Background only, no sound | -| 2 | Low | Vibrate only | -| 3 | **Default** | Normal notification | -| 4 | High | Makes sound | -| 5 | Max | Critical alert, repeats | - -**Recommended**: Priority 3 or 4 for most use cases. - -### Custom NTFY Server - -Using your own NTFY server: - -```jsonc -{ - "ntfy": { - "enabled": true, - "server": "https://ntfy.yourdomain.com", // Your server - "topic": "your-topic", - "priority": 3 - } -} -``` - -### Advanced Options - -```jsonc -{ - "ntfy": { - "enabled": true, - "topic": "your-topic", - "priority": 4, - "tags": ["robot", "chart_increasing"], // Emojis in notification - "title": "Rewards Bot", // Custom title - "clickUrl": "https://rewards.bing.com", // URL to open on click - "attachUrl": "https://example.com/image.png", // Attach image - "onlyOnError": false, // Send only on errors - "email": "you@example.com" // Also send email - } -} -``` - -### Available Tags (Emojis) - -Common ones: -- `robot`, `money`, `chart`, `check`, `warning`, `fire` -- Full list: https://ntfy.sh/docs/emojis/ - ---- - -## โš–๏ธ Comparison - -| Feature | Discord Webhooks | NTFY | -|---------|------------------|------| -| **Setup** | Medium (need server) | Easy (just install app) | -| **Detail** | Rich embeds with full stats | Simple text notifications | -| **Speed** | Fast | Instant | -| **Mobile** | Requires Discord app | Dedicated notifications app | -| **Free** | โœ… Yes | โœ… Yes | -| **Privacy** | Data goes to Discord | Self-hostable | -| **Best For** | Detailed reports | Quick alerts | - -**Recommendation**: Use **both**! -- Discord for detailed daily reports -- NTFY for instant mobile alerts - ---- - -## ๐Ÿ“ Examples - -### Both Enabled (Recommended) - -```jsonc -{ - "conclusionWebhook": { - "enabled": true, - "webhookUrl": "YOUR_DISCORD_WEBHOOK" - }, - "ntfy": { - "enabled": true, - "topic": "your-unique-topic", - "priority": 3, - "tags": ["robot", "money"] - } -} -``` - -### Errors Only - -```jsonc -{ - "conclusionWebhook": { - "enabled": true, - "webhookUrl": "YOUR_DISCORD_WEBHOOK", - "onlyOnError": true // Only send when something goes wrong - }, - "ntfy": { - "enabled": true, - "topic": "your-topic", - "priority": 5, // Max priority for errors - "onlyOnError": true - } -} -``` - -### Different Priorities for Success/Error - -```jsonc -{ - "ntfy": { - "enabled": true, - "topic": "your-topic", - "priority": 3, // Normal for success - "priorityOnError": 5, // Urgent for errors - "tags": ["robot"], - "tagsOnError": ["warning", "fire"] // Different emoji on error - } -} -``` - -### Custom Formatting - -```jsonc -{ - "conclusionWebhook": { - "enabled": true, - "webhookUrl": "YOUR_WEBHOOK", - "username": "๐Ÿค– Rewards Bot", - "color": 3066993, // Green color (decimal) - "footer": "Powered by Microsoft Rewards Bot", - "timestamp": true // Show timestamp - } -} -``` - ---- - -## ๐Ÿ”ง Troubleshooting - -### Discord webhook not working - -**Check**: -1. Webhook URL is correct (starts with `https://discord.com/api/webhooks/`) -2. Webhook still exists in Discord server settings -3. Bot has permissions to send webhooks -4. Check console for error messages - -**Test manually**: +## Example ```bash -curl -X POST "YOUR_WEBHOOK_URL" \ - -H "Content-Type: application/json" \ - -d '{"content": "Test message"}' +set DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/... +npm start ``` - -### NTFY notifications not arriving - -**Check**: -1. Topic name is correct (case-sensitive!) -2. Subscribed in app with same topic -3. App has notification permissions -4. Internet connection is stable -5. Not using a banned/common topic name - -**Test manually**: -```bash -curl -d "Test notification" "https://ntfy.sh/your-topic" -``` - -Or visit in browser: https://ntfy.sh/your-topic - -### Rate limiting - -If sending too many notifications: - -```jsonc -{ - "conclusionWebhook": { - "enabled": true, - "webhookUrl": "YOUR_WEBHOOK", - "debounceMs": 5000 // Wait 5s between messages - } -} -``` - ---- - -## ๐Ÿ†˜ Need Help? - -- ๐Ÿ’ฌ **[Discord Community](https://discord.gg/k5uHkx9mne)** โ€” Get support -- ๐Ÿ“– **[Configuration Guide](config.md)** โ€” All config options -- ๐Ÿ› **[Report Issue](https://github.com/LightZirconite/Microsoft-Rewards-Bot/issues)** โ€” Found a bug? - ---- - -
- -[โ† Back to Documentation](index.md) - -
diff --git a/docs/running.md b/docs/running.md new file mode 100644 index 0000000..97f780b --- /dev/null +++ b/docs/running.md @@ -0,0 +1,16 @@ +# Running the Bot + +## What it does +Explains the basic commands to start the bot. + +## How to use +- `npm start` โ€” builds if needed and runs once. +- `npm run dev` โ€” runs from source while you edit. +- `npm run dashboard` โ€” starts the web dashboard. +- `npm run creator` โ€” opens account creation mode. +- `npm run docker:compose` โ€” runs inside Docker with the provided compose file. + +## Example +```bash +npm start +``` diff --git a/docs/scheduling.md b/docs/scheduling.md new file mode 100644 index 0000000..52b6acb --- /dev/null +++ b/docs/scheduling.md @@ -0,0 +1,19 @@ +# Scheduling + +## What it does +Runs the bot automatically at set times. + +## How to use +- Turn on scheduling in `src/config.jsonc` under `scheduling.enabled`. +- Choose a time using the cron or Task Scheduler fields already in the config. +- Leave the machine or container running so the schedule can trigger. + +## Example +```jsonc +{ + "scheduling": { + "enabled": true, + "cron": { "schedule": "0 9 * * *" } + } +} +``` diff --git a/docs/setup.md b/docs/setup.md new file mode 100644 index 0000000..72d52d5 --- /dev/null +++ b/docs/setup.md @@ -0,0 +1,22 @@ +# Setup + +Get the bot ready before running it. + +## What it does +Creates a safe baseline so your accounts and config are ready. + +## How to use +1. Install Node.js 20 or newer. +2. Copy `src/accounts.example.jsonc` to `src/accounts.jsonc` and fill in your accounts. +3. Review `src/config.jsonc`; defaults work for most people. +4. (Optional) set `DISCORD_WEBHOOK_URL` in your environment for alerts. + +## Example +```jsonc +[ + { + "email": "you@example.com", + "password": "your-password" + } +] +``` diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md new file mode 100644 index 0000000..7824314 --- /dev/null +++ b/docs/troubleshooting.md @@ -0,0 +1,18 @@ +# Troubleshooting + +## What it does +Quick fixes for common problems. + +## How to use +- If a run fails, rerun with `npm start` after closing all browser windows. +- If builds fail, delete `node_modules` and `dist`, then run `npm install` followed by `npm run build`. +- Ensure `DISCORD_WEBHOOK_URL` is set if you expect alerts. +- Check that `accounts.jsonc` has valid emails and passwords. + +## Example +```bash +npx rimraf node_modules dist +npm install +npm run build +npm start +``` diff --git a/docs/update.md b/docs/update.md new file mode 100644 index 0000000..02c4ce8 --- /dev/null +++ b/docs/update.md @@ -0,0 +1,14 @@ +# Updating + +## What it does +Keeps the bot current with the official release. + +## How to use +- Run `npm run update` to download and apply the latest version. +- Re-run `npm install` if prompted. +- Start the bot again after the update finishes. + +## Example +```bash +npm run update +``` diff --git a/package-lock.json b/package-lock.json index eb25ad9..789bd86 100644 --- a/package-lock.json +++ b/package-lock.json @@ -450,6 +450,7 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.24.tgz", "integrity": "sha512-FE5u0ezmi6y9OZEzlJfg37mqqf6ZDSF2V/NLjUyGrR9uTZ7Sb9F7bLNZ03S4XVUNRWGA7Ck4c1kK+YnuWjl+DA==", "license": "MIT", + "peer": true, "dependencies": { "undici-types": "~6.21.0" } @@ -737,6 +738,7 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "license": "MIT", + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -987,6 +989,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "baseline-browser-mapping": "^2.8.19", "caniuse-lite": "^1.0.30001751", @@ -1559,6 +1562,7 @@ "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", @@ -3213,6 +3217,7 @@ "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.52.0.tgz", "integrity": "sha512-JAwMNMBlxJ2oD1kce4KPtMkDeKGHQstdpFPcPH3maElAXon/QZeTvtsfXmTMRyO9TslfoYOXkSsvao2nE1ilTw==", "license": "Apache-2.0", + "peer": true, "dependencies": { "playwright-core": "1.52.0" }, @@ -3972,6 +3977,7 @@ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "license": "Apache-2.0", + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" diff --git a/package.json b/package.json index 3a155f6..e8abcf6 100644 --- a/package.json +++ b/package.json @@ -85,4 +85,4 @@ "ts-node": "^10.9.2", "ws": "^8.18.3" } -} +} \ No newline at end of file