Revert "V2.4.0 (#381)" (#392)

This reverts commit f2d00225c9.
This commit is contained in:
Netsky
2025-10-23 13:36:09 +02:00
committed by GitHub
parent f2d00225c9
commit 2a8ab7242f
28 changed files with 690 additions and 1333 deletions

View File

@@ -1,18 +1,16 @@
# 📊 Discord Webhooks
**Get beautiful run summaries in Discord**
**Get run summaries in Discord**
---
## 💡 What Is It?
Sends a **professional, rich embed** to your Discord server after each run with:
- 📊 **Total accounts processed** with success/warning/banned breakdown
- 💎 **Points earned** — clear before/after comparison
- **Performance metrics** — average points and execution time
- 📈 **Per-account breakdown** — detailed stats for each account
- 🎨 **Beautiful formatting** — color-coded status, emojis, and clean layout
- ⏱️ **Timestamp** and version info in footer
Sends a **rich embed** to your Discord server after each run with:
- 📊 Total accounts processed
- 💎 Points earned
- ⏱️ Execution time
- ❌ Errors encountered
---
@@ -33,10 +31,7 @@ Sends a **professional, rich embed** to your Discord server after each run with:
"notifications": {
"conclusionWebhook": {
"enabled": true,
"url": "https://discord.com/api/webhooks/123456789/abcdef-your-webhook-token",
// Optional: Customize webhook appearance
"username": "Microsoft Rewards",
"avatarUrl": "https://media.discordapp.net/attachments/1421163952972369931/1421929950377939125/Gc.png"
"url": "https://discord.com/api/webhooks/123456789/abcdef-your-webhook-token"
}
}
}
@@ -48,51 +43,30 @@ Sends a **professional, rich embed** to your Discord server after each run with:
## 📋 Example Summary
The new webhook format provides a **clean, professional Discord embed** with:
### Main Summary Card
```
🎯 Microsoft Rewards — Daily Summary
🎯 Microsoft Rewards Summary
Status: ✅ Success
Version: v2.4.0 • Run ID: abc123xyz
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 Accounts: 3 • 0 with issues
💎 Points: 15,230 → 16,890 (+1,660)
⏱️ Average Duration: 8m 32s
📈 Cumulative Runtime: 25m 36s
📊 Global Statistics
💎 Total Points Earned
15,230 → 16,890 (+1,660)
👤 user1@example.com
Points: 5,420 → 6,140 (+720)
Duration: 7m 23s
Status: ✅ Completed successfully
📊 Accounts Processed
✅ Success: 3 | ⚠️ Errors: 0 | 🚫 Banned: 0
Total: 3 accounts
👤 user2@example.com
Points: 4,810 → 5,750 (+940)
Duration: 9m 41s
Status: ✅ Completed successfully
⚡ Performance
Average: 553pts/account in 8m 32s
Total Runtime: 25m 36s
👤 user3@example.com
Points: 5,000 → 5,000 (+0)
Duration: 8m 32s
Status: ✅ Completed successfully
```
### Per-Account Details
```
<EFBFBD> Account Details
✅ user1@example.com
└ Points: +720 (🖥️ 450 • 📱 270)
└ Duration: 7m 23s
✅ user2@example.com
└ Points: +940 (🖥️ 540 • 📱 400)
└ Duration: 9m 41s
✅ user3@example.com
└ Points: +0 (🖥️ 0 • 📱 0)
└ Duration: 8m 32s
```
**Color coding:**
- 🟢 **Green** — All accounts successful
- 🟠 **Orange** — Some accounts with errors
- 🔴 **Red** — Banned accounts detected
---
## 🎯 Advanced: Separate Channels
@@ -104,15 +78,11 @@ Use different webhooks for different notifications:
"notifications": {
"webhook": {
"enabled": true,
"url": "https://discord.com/api/webhooks/.../errors-channel",
"username": "Rewards Errors",
"avatarUrl": "https://example.com/error-icon.png"
"url": "https://discord.com/api/webhooks/.../errors-channel"
},
"conclusionWebhook": {
"enabled": true,
"url": "https://discord.com/api/webhooks/.../summary-channel",
"username": "Rewards Summary",
"avatarUrl": "https://example.com/success-icon.png"
"url": "https://discord.com/api/webhooks/.../summary-channel"
}
}
}
@@ -121,53 +91,6 @@ Use different webhooks for different notifications:
- **`webhook`** — Real-time errors during execution
- **`conclusionWebhook`** — End-of-run summary
### 🎨 Customize Webhook Appearance
You can personalize how your webhook appears in Discord:
- **`username`** — The display name shown in Discord (default: "Microsoft Rewards")
- **`avatarUrl`** — Direct URL to an image for the webhook's avatar
**Example:**
```jsonc
"conclusionWebhook": {
"enabled": true,
"url": "YOUR_WEBHOOK_URL",
"username": "My Custom Bot Name",
"avatarUrl": "https://i.imgur.com/YourImage.png"
}
```
> **💡 Tip:** If you set custom values for both `webhook` and `conclusionWebhook`, the conclusion webhook will use its own settings. Otherwise, it falls back to the main webhook settings.
---
## 🎨 New Enhanced Format Features
The **v2.4+** webhook format includes:
### Visual Improvements
-**Clean, professional layout** with clear sections
- 🎨 **Color-coded status** (Green/Orange/Red based on results)
- 📊 **Thumbnail image** for brand recognition
-**Footer with timestamp** and version info
- 🔢 **Formatted numbers** with thousands separators
### Better Organization
- **Main embed** — Global statistics and summary
- **Detail fields** — Per-account breakdown (auto-splits for many accounts)
- **Smart truncation** — Long emails and errors are shortened intelligently
- **Status icons** — ✅ Success, ⚠️ Warning, 🚫 Banned
### More Information
- **Before/After points** — Clear progression tracking
- **Desktop vs Mobile** breakdown per account
- **Success rate** — Quick glance at account health
- **Performance metrics** — Average time and points per account
### Smart Splitting
If you have many accounts (5+), the webhook automatically splits details into multiple fields to avoid hitting Discord's character limits.
---
## 🛠️ Troubleshooting

148
docs/getting-started.md Normal file
View File

@@ -0,0 +1,148 @@
# 🚀 Getting Started
**From zero to your first run in 10 minutes**
---
## ✅ Requirements
- **Node.js 20+** → [Download here](https://nodejs.org/)
- **Microsoft accounts** with email + password
- *Optional:* Docker for containers
---
## ⚡ Quick Setup (Recommended)
### Windows
```powershell
setup\setup.bat
```
### Linux / macOS
```bash
bash setup/setup.sh
```
### What Does It Do?
1. ✅ Asks for your Microsoft credentials
2. ✅ Creates `accounts.json` automatically
3. ✅ Installs dependencies
4. ✅ Builds the project
5. ✅ Runs your first automation (optional)
**That's it! 🎉**
---
## 🎯 After Installation
### 1⃣ Enable Scheduler (Recommended)
Run automatically once per day:
**Edit** `src/config.jsonc`:
```jsonc
{
"schedule": {
"enabled": true,
"time": "09:00",
"timeZone": "America/New_York"
}
}
```
**Start scheduler:**
```bash
npm run start:schedule
```
**[Full Scheduler Guide](./schedule.md)**
---
### 2⃣ Add Notifications (Optional)
Get a summary after each run:
```jsonc
{
"conclusionWebhook": {
"enabled": true,
"url": "https://discord.com/api/webhooks/YOUR_WEBHOOK_URL"
}
}
```
**[Discord Setup](./conclusionwebhook.md)** | **[NTFY Setup](./ntfy.md)**
---
### 3⃣ Enable Humanization (Anti-Ban)
More natural behavior:
```jsonc
{
"humanization": {
"enabled": true
}
}
```
**[Humanization Guide](./humanization.md)**
---
## 🛠️ Common Issues
| Problem | Solution |
|---------|----------|
| **"Node.js not found"** | Install Node.js 20+ and restart terminal |
| **"accounts.json missing"** | Run `setup/setup.bat` or create manually |
| **"Login failed"** | Check email/password in `accounts.json` |
| **"2FA prompt"** | Add TOTP secret → [2FA Guide](./accounts.md) |
| **Script crashes** | Check [Diagnostics Guide](./diagnostics.md) |
---
## 🔧 Manual Setup (Advanced)
<details>
<summary><strong>Click to expand</strong></summary>
```bash
# 1. Configure accounts
cp src/accounts.example.json src/accounts.json
# Edit accounts.json with your credentials
# 2. Install & build
npm install
npm run build
# 3. Run
npm start
```
</details>
---
## 📚 Next Steps
**Everything works?**
**[Setup Scheduler](./schedule.md)** for daily automation
**Need 2FA?**
**[Accounts & TOTP Guide](./accounts.md)**
**Want Docker?**
**[Docker Guide](./docker.md)**
**Having issues?**
**[Diagnostics](./diagnostics.md)**
---
**[← Back to Hub](./index.md)** | **[All Docs](./index.md)**