mirror of
https://github.com/LightZirconite/Microsoft-Rewards-Bot.git
synced 2026-01-09 17:06:15 +00:00
feat: update documentation and improve error reporting features
This commit is contained in:
@@ -1,20 +1,38 @@
|
||||
# Error Reporting API
|
||||
# Error Reporting
|
||||
|
||||
## What it does
|
||||
Accepts structured error reports and forwards them to Discord in a clean format. Submissions require a shared secret header so random users cannot spam your webhook.
|
||||
Automatically sends anonymized error reports to help improve the project. When enabled, the bot reports genuine bugs (not user configuration errors) to a central Discord webhook.
|
||||
|
||||
## How to use
|
||||
- Set `DISCORD_WEBHOOK_URL` and `ERROR_REPORT_TOKEN` in your environment (e.g., Vercel project settings → Environment Variables).
|
||||
- Send a POST request to `/api/report-error` with header `x-error-report-token: <your token>` and JSON that includes at least `error`.
|
||||
- Optional fields: `summary`, `type`, `metadata` (object), `environment` (string or object with `name`).
|
||||
## Privacy
|
||||
- **No sensitive data is sent:** Emails, passwords, tokens, and file paths are automatically redacted.
|
||||
- **Only genuine bugs are reported:** User configuration errors (wrong password, missing files) are filtered out.
|
||||
- **Completely optional:** Disable in config.jsonc if you prefer not to participate.
|
||||
|
||||
## Example
|
||||
```bash
|
||||
curl -X POST https://your-deployment.vercel.app/api/report-error \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "x-error-report-token: YOUR_TOKEN" \
|
||||
-d '{"error":"Search job failed","type":"search","metadata":{"account":"user@contoso.com"}}'
|
||||
## How to configure
|
||||
In src/config.jsonc:
|
||||
|
||||
```jsonc
|
||||
{
|
||||
"errorReporting": {
|
||||
"enabled": true // Set to false to disable
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## What gets reported
|
||||
- Error message (sanitized)
|
||||
- Stack trace (truncated, paths removed)
|
||||
- Bot version
|
||||
- OS platform and architecture
|
||||
- Node.js version
|
||||
- Timestamp
|
||||
|
||||
## What is filtered out
|
||||
- Login failures (your credentials are never sent)
|
||||
- Account suspensions/bans
|
||||
- Configuration errors (missing files, invalid settings)
|
||||
- Network timeouts
|
||||
- Expected errors (daily limit reached, activity not available)
|
||||
|
||||
---
|
||||
**[← Back to Documentation](index.md)**
|
||||
**[Back to Documentation](index.md)**
|
||||
@@ -1,16 +1,37 @@
|
||||
# Microsoft Rewards Bot Docs
|
||||
|
||||
This folder contains short, task-focused guides. Pick what you need and keep runs simple.
|
||||
Welcome to the **v3.5 Remaster** documentation. These guides cover everything from first-time setup to advanced configuration.
|
||||
|
||||
- **[Setup](setup.md)** — prerequisites and preparing account files.
|
||||
- **[Running](running.md)** — commands to start the bot.
|
||||
- **[Modes](modes.md)** — what each mode does and when to use it.
|
||||
- **[Configuration](configuration.md)** — adjust the core settings file.
|
||||
- **[Account Creation](account-creation.md)** — create new accounts safely.
|
||||
- **[Dashboard](dashboard.md)** — view progress in the web panel.
|
||||
- **[Scheduling](scheduling.md)** — automate runs on a schedule.
|
||||
- **[Notifications](notifications.md)** — send alerts to Discord or other webhooks.
|
||||
- **[Error Reporting](error-reporting.md)** — send structured error reports to Discord.
|
||||
- **[Docker](docker.md)** — run the bot in a container.
|
||||
- **[Update](update.md)** — keep the project up to date.
|
||||
- **[Troubleshooting](troubleshooting.md)** — quick fixes for common issues.
|
||||
## Getting Started
|
||||
- **[Setup](setup.md)** — Install prerequisites and configure your accounts.
|
||||
- **[Running](running.md)** — Commands to start the bot.
|
||||
- **[Modes](modes.md)** — Understand the different running modes.
|
||||
|
||||
## Configuration
|
||||
- **[Configuration](configuration.md)** — Adjust bot behavior via `config.jsonc`.
|
||||
- **[Scheduling](scheduling.md)** — Automate daily runs with built-in scheduler.
|
||||
- **[Notifications](notifications.md)** — Discord webhooks and NTFY push alerts.
|
||||
|
||||
## Features
|
||||
- **[Dashboard](dashboard.md)** — Real-time web monitoring panel.
|
||||
- **[Account Creation](account-creation.md)** — Create new Microsoft accounts (use with caution).
|
||||
- **[Error Reporting](error-reporting.md)** — Automatic anonymized bug reports.
|
||||
|
||||
## Deployment
|
||||
- **[Docker](docker.md)** — Run the bot in a container with scheduling.
|
||||
- **[Update](update.md)** — Keep the project up to date.
|
||||
|
||||
## Help
|
||||
- **[Troubleshooting](troubleshooting.md)** — Quick fixes for common issues.
|
||||
|
||||
---
|
||||
|
||||
## Quick Reference
|
||||
|
||||
| Command | Description |
|
||||
|---------|-------------|
|
||||
| `npm start` | Build and run the bot |
|
||||
| `npm run dashboard` | Start web monitoring panel |
|
||||
| `npm run creator` | Account creation wizard |
|
||||
| `npm run dev` | Development mode |
|
||||
| `npm run docker:compose` | Run in Docker |
|
||||
|
||||
@@ -1,25 +1,85 @@
|
||||
# Setup
|
||||
|
||||
Get the bot ready before running it.
|
||||
Get the bot ready before your first run.
|
||||
|
||||
## What it does
|
||||
Creates a safe baseline so your accounts and config are ready.
|
||||
## Prerequisites
|
||||
- **Node.js 20 or newer** - [Download here](https://nodejs.org/)
|
||||
- **Git** (optional) - For cloning the repository
|
||||
|
||||
## 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.
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
# Clone the repository
|
||||
git clone https://github.com/LightZirconite/Microsoft-Rewards-Bot.git
|
||||
cd Microsoft-Rewards-Bot
|
||||
|
||||
# Install dependencies (happens automatically on first run)
|
||||
npm install
|
||||
```
|
||||
|
||||
## Account Configuration
|
||||
|
||||
1. Copy the example file:
|
||||
```bash
|
||||
cp src/accounts.example.jsonc src/accounts.jsonc
|
||||
```
|
||||
|
||||
2. Edit src/accounts.jsonc with your Microsoft account(s):
|
||||
|
||||
## Example
|
||||
```jsonc
|
||||
[
|
||||
{
|
||||
"email": "you@example.com",
|
||||
"email": "your-email@outlook.com",
|
||||
"password": "your-password"
|
||||
},
|
||||
{
|
||||
"email": "second-account@outlook.com",
|
||||
"password": "another-password",
|
||||
"totp": "YOUR_2FA_SECRET" // Optional: for accounts with 2FA
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
## Optional: 2FA Support
|
||||
If your account has two-factor authentication enabled, add the TOTP secret:
|
||||
- Extract the secret from your authenticator app setup QR code
|
||||
- Add it as the totp field in your account entry
|
||||
|
||||
## Optional: Proxy Support
|
||||
For accounts that need a proxy:
|
||||
```jsonc
|
||||
{
|
||||
"email": "account@outlook.com",
|
||||
"password": "password",
|
||||
"proxy": "http://user:pass@proxy.example.com:8080"
|
||||
}
|
||||
```
|
||||
|
||||
## Optional: Discord Notifications
|
||||
Set up Discord webhook alerts:
|
||||
```bash
|
||||
# Windows
|
||||
set DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/...
|
||||
|
||||
# Linux/Mac
|
||||
export DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/...
|
||||
```
|
||||
|
||||
Or configure in src/config.jsonc:
|
||||
```jsonc
|
||||
{
|
||||
"webhook": {
|
||||
"enabled": true,
|
||||
"url": "https://discord.com/api/webhooks/..."
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Verify Setup
|
||||
Run the bot once to verify everything works:
|
||||
```bash
|
||||
npm start
|
||||
```
|
||||
|
||||
---
|
||||
**[← Back to Documentation](index.md)**
|
||||
**[Back to Documentation](index.md)**
|
||||
|
||||
Reference in New Issue
Block a user