mirror of
https://github.com/LightZirconite/Microsoft-Rewards-Bot.git
synced 2026-01-09 17:06:15 +00:00
feat: Centralize timeout constants and improve navigation error handling in Login flow
This commit is contained in:
@@ -1,99 +0,0 @@
|
||||
# 🎯 Account Creator - How to Use
|
||||
|
||||
## ⚠️ CRITICAL: The `--` separator
|
||||
|
||||
**npm consumes `-y` if you don't use `--` !**
|
||||
|
||||
### ❌ WRONG (doesn't work)
|
||||
```powershell
|
||||
npm run creator "URL" -y
|
||||
# Result: -y is consumed by npm, not passed to the script
|
||||
```
|
||||
|
||||
### ✅ CORRECT (works)
|
||||
```powershell
|
||||
npm run creator -- "URL" -y
|
||||
# The -- tells npm: "everything after belongs to the script"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 📋 Examples
|
||||
|
||||
### Auto mode (no questions asked)
|
||||
```powershell
|
||||
npm run creator -- "https://rewards.bing.com/welcome?rh=E3DCB441" -y
|
||||
```
|
||||
|
||||
### Auto mode with recovery email
|
||||
```powershell
|
||||
npm run creator -- "https://rewards.bing.com/welcome?rh=E3DCB441" -y maxou.freq@gmail.com
|
||||
```
|
||||
|
||||
### Interactive mode (asks for options)
|
||||
```powershell
|
||||
npm run creator -- "https://rewards.bing.com/welcome?rh=E3DCB441"
|
||||
```
|
||||
|
||||
### -y can be BEFORE the URL too
|
||||
```powershell
|
||||
npm run creator -- -y "https://rewards.bing.com/welcome?rh=E3DCB441"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🔧 Flags
|
||||
|
||||
| Flag | Description |
|
||||
|------|-------------|
|
||||
| `--` | **REQUIRED** - Separates npm args from script args |
|
||||
| `-y` or `--yes` | Auto-accept all prompts (no questions) |
|
||||
| `"URL"` | Referral URL (use quotes!) |
|
||||
| `email@domain.com` | Recovery email (optional) |
|
||||
|
||||
---
|
||||
|
||||
## 🚨 Common Errors
|
||||
|
||||
### "Generate email automatically? (Y/n):" appears even with -y
|
||||
|
||||
**Cause**: You forgot the `--` separator
|
||||
|
||||
**Fix**: Add `--` after `npm run creator`
|
||||
|
||||
```powershell
|
||||
# ❌ WRONG
|
||||
npm run creator "URL" -y
|
||||
|
||||
# ✅ CORRECT
|
||||
npm run creator -- "URL" -y
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### URL is truncated at & character
|
||||
|
||||
**Cause**: URL not wrapped in quotes
|
||||
|
||||
**Fix**: Always use quotes around URLs
|
||||
|
||||
```powershell
|
||||
# ❌ WRONG
|
||||
npm run creator -- https://rewards.bing.com/welcome?rh=CODE&ref=xxx -y
|
||||
|
||||
# ✅ CORRECT
|
||||
npm run creator -- "https://rewards.bing.com/welcome?rh=CODE&ref=xxx" -y
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 📝 Full Command Template
|
||||
|
||||
```powershell
|
||||
npm run creator -- "https://rewards.bing.com/welcome?rh=YOUR_CODE" -y your.email@gmail.com
|
||||
↑ ↑ ↑ ↑
|
||||
| | | |
|
||||
| URL in quotes (required if contains &) | Optional recovery email
|
||||
| |
|
||||
-- separator (REQUIRED for -y to work) -y flag (auto mode)
|
||||
```
|
||||
@@ -1,80 +0,0 @@
|
||||
# 🐛 Automatic Error Reporting
|
||||
|
||||
## Overview
|
||||
|
||||
The bot automatically reports errors to a community webhook to help identify and fix issues faster, without requiring manual bug reports from users.
|
||||
|
||||
## Key Features
|
||||
|
||||
✅ **Privacy-First** - Only non-sensitive error information is sent
|
||||
✅ **Opt-Out** - Can be disabled in configuration
|
||||
✅ **Obfuscated Webhook** - URL is base64-encoded
|
||||
✅ **Automatic Sanitization** - Removes emails, paths, tokens, and IPs
|
||||
✅ **Intelligent Filtering** - Excludes user configuration errors and false positives
|
||||
✅ **System Information** - Includes version, platform, architecture for debugging
|
||||
|
||||
## What's Sent
|
||||
|
||||
- Error message (sanitized)
|
||||
- Stack trace (truncated, sanitized)
|
||||
- Bot version
|
||||
- Operating system and architecture
|
||||
- Node.js version
|
||||
- Timestamp
|
||||
|
||||
## What's NOT Sent
|
||||
|
||||
- ❌ Email addresses (redacted)
|
||||
- ❌ File paths (redacted)
|
||||
- ❌ IP addresses (redacted)
|
||||
- ❌ Tokens/API keys (redacted)
|
||||
- ❌ Account credentials
|
||||
- ❌ Personal information
|
||||
|
||||
## Filtered Errors
|
||||
|
||||
The system intelligently filters out:
|
||||
- User configuration errors (missing files, invalid credentials)
|
||||
- Expected errors (no points, already completed)
|
||||
- Network issues (proxy failures, port conflicts)
|
||||
- Account-specific issues (banned accounts)
|
||||
|
||||
## Configuration
|
||||
|
||||
In `config.jsonc`:
|
||||
|
||||
```jsonc
|
||||
"errorReporting": {
|
||||
"enabled": true, // Set to false to disable
|
||||
"webhookUrl": "aHR0cHM6Ly9kaXNjb3JkLmNvbS9hcGkvd2ViaG9va3MvMTQzNzExMTk2MjM5NDY4OTYyOS90bHZHS1phSDktckppcjR0blpLU1pwUkhTM1liZU40dlpudUN2NTBrNU1wQURZUlBuSG5aNk15YkFsZ0Y1UUZvNktIXw=="
|
||||
}
|
||||
```
|
||||
|
||||
### Disable Error Reporting
|
||||
|
||||
Set `enabled` to `false`:
|
||||
|
||||
```jsonc
|
||||
"errorReporting": {
|
||||
"enabled": false,
|
||||
"webhookUrl": "..."
|
||||
}
|
||||
```
|
||||
|
||||
## Privacy & Security
|
||||
|
||||
- No PII is sent
|
||||
- All sensitive data is automatically redacted
|
||||
- Webhook URL is obfuscated (base64)
|
||||
- Fire-and-forget (never blocks execution)
|
||||
- Silent failure if webhook is unreachable
|
||||
|
||||
## Technical Details
|
||||
|
||||
- **File**: `src/util/ErrorReportingWebhook.ts`
|
||||
- **Integration**: Automatic via `Logger.ts`
|
||||
- **Method**: HTTP POST to Discord webhook
|
||||
- **Timeout**: 10 seconds
|
||||
- **Filtering**: Pattern-based false positive detection
|
||||
|
||||
Thank you for helping improve the bot! 🙏
|
||||
Reference in New Issue
Block a user