mirror of
https://github.com/TheNetsky/Microsoft-Rewards-Script.git
synced 2026-01-11 19:06:18 +00:00
* first commit * Addition of a personalized activity manager and refactoring of the logic of activities * Adding diagnostics management, including screenshot and HTML content, as well as improvements to humanize page interactions and +. * Adding the management of newspapers and webhook settings, including filtering messages and improving the structure of the summaries sent. * Adding a post-execution auto-date functionality, including options to update via Git and Docker, as well as a new configuration interface to manage these parameters. * Adding accounts in Docker, with options to use an environmental file or online JSON data, as well as minimum validations for responsible accounts. * Improving the Microsoft Rewards script display with a new headband and better log management, including colors and improved formatting for the console. * v2 * Refactor ESLint configuration and scripts for improved TypeScript support and project structure * Addition of the detection of suspended accounts with the gesture of the improved errors and journalization of banishment reasons * Adding an integrated planner for programmed task execution, with configuration in Config.json and + * Edit * Remove texte * Updating of documentation and adding the management of humanization in the configuration and +. * Adding manual purchase method allowing users to spend points without automation, with monitoring of expenses and notifications. * Correction of documentation and improvement of configuration management for manual purchase mode, adding complete documentation and appropriate banner display. * Add comprehensive documentation for job state persistence, NTFY notifications, proxy configuration, scheduling, and auto-update features - Introduced job state persistence documentation to track progress and resume tasks. - Added NTFY push notifications integration guide for real-time alerts. - Documented proxy configuration options for enhanced privacy and network management. - Included scheduling configuration for automated script execution. - Implemented auto-update configuration to keep installations current with Git and Docker options. * Ajout d'Unt Système de Rapport d'Erreurs Communautaire pour Améliorerer le Débogage, incluant la Configuration et l'Envoi de Résumés D'Erreurs Anonyés à un webhook Discord. * Mini Edit * Mise à Jour du Readme.md pour Améliorerer la Présentation et La Claté, Ajout d'Un section sur les notifications en Temps Raine et Mise à Jour des badges pour la meille unibilité. * Documentation update * Edit README.md * Edit * Update README with legacy version link * Improvement of location data management and webhooks, adding configurations normalization * Force update for PR * Improvement of documentation and configuration options for Cron integration and Docker use * Improvement of planning documentation and adding a multi-pan-pancake in the daily execution script * Deletion of the CommunityReport functionality in accordance with the project policy * Addition of randomization of start -up schedules and surveillance time for planner executions * Refactor Docker setup to use built-in scheduler, removing cron dependencies and simplifying configuration options * Adding TOTP support for authentication, update of interfaces and configuration files to include Totp secret, and automatic generation of the Totp code when connecting. * Fix [LOGIN-NO-PROMPT] No dialogs (xX) * Reset the Totp field for email_1 in the accounts.example.json file * Reset the Totp field for email_1 in the Readme.md file * Improvement of Bing Research: Use of the 'Attacked' method for the research field, management of overlays and adding direct navigation in the event of entry failure. * Adding a complete security policy, including directives on vulnerability management, coordinated disclosure and user security advice. * Remove advanced environment variables section from README * Configuration and dockerfile update: Passage to Node 22, addition of management of the purchase method, deletion of obsolete scripts * Correction of the order of the sections in the Readme.md for better readability * Update of Readm and Security Policy: Addition of the method of purchase and clarification of security and confidentiality practices. * Improvement of the readability of the Readm and deletion of the mention of reporting of vulnerabilities in the security document. * Addition of humanization management and adaptive throttling to simulate more human behavior in bot activities. * Addition of humanization management: activation/deactivation of human gestures, configuration update and adding documentation on human mode. * Deletion of community error report functionality to respect the privacy policy * Addition of immediate banning alerts and vacation configuration in the Microsoft Rewards bot * Addition of immediate banning alerts and vacation configuration in the Microsoft Rewards bot * Added scheduling support: support for 12h and 24h formats, added options for time zone, and immediate execution on startup. * Added window size normalization and page rendering to fit typical screens, with injected CSS styles to prevent excessive zooming. * Added security incident management: detection of hidden recovery emails, automation blocking, and global alerts. Updated configuration files and interfaces to include recovery emails. Improved security incident documentation. * Refactor incident alert handling: unified alert sender * s * Added security incident management: detect recovery email inconsistencies and send unified alerts. Implemented helper methods to manage alerts and compromised modes. * Added heartbeat management for the scheduler: integrated a heartbeat file to report liveliness and adjusted the watchdog configuration to account for heartbeat updates. * Edit webook * Updated security alert management: fixed the recovery email hidden in the documentation and enabled the conclusion webhook for notifications. * Improved security alert handling: added structured sending to webhooks for better visibility and updated callback interval in compromised mode. * Edit conf * Improved dependency installation: Added the --ignore-scripts option for npm ci and npm install. Updated comments in compose.yaml for clarity. * Refactor documentation structure and enhance logging: - Moved documentation files from 'information' to 'docs' directory for better organization. - Added live logging configuration to support webhook logs with email redaction. - Updated file paths in configuration and loading functions to accommodate new structure. - Adjusted scheduler behavior to prevent immediate runs unless explicitly set. - Improved error handling for account and config file loading. - Enhanced security incident documentation with detailed recovery steps. * Fix docs * Remove outdated documentation on NTFY, Proxy, Scheduling, Security, and Auto-Update configurations; update Browser class to prioritize headless mode based on environment variable. * Addition of documentation for account management and Totp, Docker Guide, and Update of the Documentation Index. * Updating Docker documentation: simplification of instructions and adding links to detailed guides. Revision of configuration options and troubleshooting sections. * Edit * Edit docs * Enhance documentation for Scheduler, Security, and Auto-Update features - Revamped the Scheduler documentation to include detailed features, configuration options, and usage examples. - Expanded the Security guide with comprehensive incident response strategies, privacy measures, and monitoring practices. - Updated the Auto-Update section to clarify configuration, methods, and best practices for maintaining system integrity. * Improved error handling and added crash recovery in the Microsoft Rewards bot. Added configuration for automatic restart and handling of local search queries when trends fail. * Fixed initial point counting in MicrosoftRewardsBot and improved error handling when sending summaries to webhooks. * Added unified support for notifications and improved handling of webhook configurations in the normalizeConfig and log functions. * UPDATE LOGIN * EDIT LOGIN * Improved login error handling: added recovery mismatch detection and the ability to switch to password authentication. * Added a full reference to configuration in the documentation and improved log and error handling in the code. * Added context management for conclusion webhooks and improved user configuration for notifications. * Mini edit * Improved logic for extracting masked emails for more accurate matching during account recovery.
389 lines
9.2 KiB
Markdown
389 lines
9.2 KiB
Markdown
# 📊 Discord Conclusion Webhook
|
|
|
|
<div align="center">
|
|
|
|
**🎯 Comprehensive session summaries via Discord**
|
|
*Complete execution reports delivered instantly*
|
|
|
|
</div>
|
|
|
|
---
|
|
|
|
## 🎯 What is the Conclusion Webhook?
|
|
|
|
The conclusion webhook sends a **detailed summary notification** at the end of each script execution via Discord, providing a complete overview of the session's results across all accounts.
|
|
|
|
### **Key Features**
|
|
- 📊 **Session overview** — Total accounts processed, success/failure counts
|
|
- 💎 **Points summary** — Starting points, earned points, final totals
|
|
- ⏱️ **Performance metrics** — Execution times, efficiency statistics
|
|
- ❌ **Error reporting** — Issues encountered during execution
|
|
- 💳 **Buy mode detection** — Point spending alerts and tracking
|
|
- 🎨 **Rich embeds** — Color-coded, well-formatted Discord messages
|
|
|
|
---
|
|
|
|
## ⚙️ Configuration
|
|
|
|
### **Basic Setup**
|
|
```json
|
|
{
|
|
"notifications": {
|
|
"conclusionWebhook": {
|
|
"enabled": true,
|
|
"url": "https://discord.com/api/webhooks/123456789/abcdef-webhook-token-here"
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
### **Configuration Options**
|
|
|
|
| Setting | Description | Example |
|
|
|---------|-------------|---------|
|
|
| `enabled` | Enable conclusion webhook | `true` |
|
|
| `url` | Discord webhook URL | Full webhook URL from Discord |
|
|
|
|
---
|
|
|
|
## 🚀 Discord Setup
|
|
|
|
### **Step 1: Create Webhook**
|
|
1. **Open Discord** and go to your server
|
|
2. **Right-click** on the channel for notifications
|
|
3. **Select "Edit Channel"**
|
|
4. **Go to "Integrations" tab**
|
|
5. **Click "Create Webhook"**
|
|
|
|
### **Step 2: Configure Webhook**
|
|
- **Name** — "MS Rewards Summary"
|
|
- **Avatar** — Upload rewards icon (optional)
|
|
- **Channel** — Select appropriate channel
|
|
- **Copy webhook URL**
|
|
|
|
### **Step 3: Add to Config**
|
|
```json
|
|
{
|
|
"notifications": {
|
|
"conclusionWebhook": {
|
|
"enabled": true,
|
|
"url": "YOUR_COPIED_WEBHOOK_URL_HERE"
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
---
|
|
|
|
## 📋 Message Format
|
|
|
|
### **Rich Embed Summary**
|
|
|
|
#### **Header Section**
|
|
```
|
|
🎯 Microsoft Rewards Summary
|
|
⏰ Completed at 2025-01-20 14:30:15
|
|
📈 Total Runtime: 25m 36s
|
|
```
|
|
|
|
#### **Account Statistics**
|
|
```
|
|
📊 Accounts: 3 • 0 with issues
|
|
```
|
|
|
|
#### **Points Overview**
|
|
```
|
|
💎 Points: 15,230 → 16,890 (+1,660)
|
|
```
|
|
|
|
#### **Performance Metrics**
|
|
```
|
|
⏱️ Average Duration: 8m 32s
|
|
📈 Cumulative Runtime: 25m 36s
|
|
```
|
|
|
|
#### **Buy Mode Detection** (if applicable)
|
|
```
|
|
💳 Buy Mode Activity Detected
|
|
Total Spent: 1,200 points across 2 accounts
|
|
```
|
|
|
|
### **Account Breakdown**
|
|
|
|
#### **Successful Account**
|
|
```
|
|
👤 user@example.com
|
|
Points: 5,420 → 6,140 (+720)
|
|
Duration: 7m 23s
|
|
Status: ✅ Completed successfully
|
|
```
|
|
|
|
#### **Failed Account**
|
|
```
|
|
👤 problem@example.com
|
|
Points: 3,210 → 3,210 (+0)
|
|
Duration: 2m 15s
|
|
Status: ❌ Failed - Login timeout
|
|
```
|
|
|
|
#### **Buy Mode Account**
|
|
```
|
|
💳 spender@example.com
|
|
Session Spent: 500 points
|
|
Available: 12,500 points
|
|
Status: 💳 Purchase activity detected
|
|
```
|
|
|
|
---
|
|
|
|
## 📊 Message Examples
|
|
|
|
### **Successful Session**
|
|
```discord
|
|
🎯 Microsoft Rewards Summary
|
|
|
|
📊 Accounts: 3 • 0 with issues
|
|
💎 Points: 15,230 → 16,890 (+1,660)
|
|
⏱️ Average Duration: 8m 32s
|
|
📈 Cumulative Runtime: 25m 36s
|
|
|
|
👤 user1@example.com
|
|
Points: 5,420 → 6,140 (+720)
|
|
Duration: 7m 23s
|
|
Status: ✅ Completed successfully
|
|
|
|
👤 user2@example.com
|
|
Points: 4,810 → 5,750 (+940)
|
|
Duration: 9m 41s
|
|
Status: ✅ Completed successfully
|
|
|
|
👤 user3@example.com
|
|
Points: 5,000 → 5,000 (+0)
|
|
Duration: 8m 32s
|
|
Status: ✅ Completed successfully
|
|
```
|
|
|
|
### **Session with Issues**
|
|
```discord
|
|
🎯 Microsoft Rewards Summary
|
|
|
|
📊 Accounts: 3 • 1 with issues
|
|
💎 Points: 15,230 → 15,950 (+720)
|
|
⏱️ Average Duration: 6m 15s
|
|
📈 Cumulative Runtime: 18m 45s
|
|
|
|
👤 user1@example.com
|
|
Points: 5,420 → 6,140 (+720)
|
|
Duration: 7m 23s
|
|
Status: ✅ Completed successfully
|
|
|
|
👤 user2@example.com
|
|
Points: 4,810 → 4,810 (+0)
|
|
Duration: 2m 15s
|
|
Status: ❌ Failed - Login timeout
|
|
|
|
👤 user3@example.com
|
|
Points: 5,000 → 5,000 (+0)
|
|
Duration: 9m 07s
|
|
Status: ⚠️ Partially completed - Quiz failed
|
|
```
|
|
|
|
### **Buy Mode Detection**
|
|
```discord
|
|
🎯 Microsoft Rewards Summary
|
|
|
|
📊 Accounts: 2 • 0 with issues
|
|
💎 Points: 25,500 → 24,220 (-1,280)
|
|
💳 Buy Mode Activity Detected
|
|
Total Spent: 1,500 points across 1 account
|
|
|
|
👤 buyer@example.com
|
|
Points: 15,000 → 13,500 (-1,500)
|
|
Duration: 12m 34s
|
|
Status: 💳 Buy mode detected
|
|
Activities: Purchase completed, searches skipped
|
|
|
|
👤 normal@example.com
|
|
Points: 10,500 → 10,720 (+220)
|
|
Duration: 8m 45s
|
|
Status: ✅ Completed successfully
|
|
```
|
|
|
|
---
|
|
|
|
## 🤝 Integration with Other Notifications
|
|
|
|
### **Webhook vs Conclusion Webhook**
|
|
|
|
| Feature | Real-time Webhook | Conclusion Webhook |
|
|
|---------|------------------|-------------------|
|
|
| **Timing** | During execution | End of session only |
|
|
| **Content** | Errors, warnings, progress | Comprehensive summary |
|
|
| **Frequency** | Multiple per session | One per session |
|
|
| **Purpose** | Immediate alerts | Session overview |
|
|
|
|
### **Recommended Combined Setup**
|
|
```json
|
|
{
|
|
"notifications": {
|
|
"webhook": {
|
|
"enabled": true,
|
|
"url": "https://discord.com/api/webhooks/.../real-time"
|
|
},
|
|
"conclusionWebhook": {
|
|
"enabled": true,
|
|
"url": "https://discord.com/api/webhooks/.../summary"
|
|
},
|
|
"ntfy": {
|
|
"enabled": true,
|
|
"url": "https://ntfy.sh",
|
|
"topic": "rewards-mobile"
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
### **Benefits of Combined Setup**
|
|
- ⚡ **Real-time webhook** — Immediate error alerts
|
|
- 📊 **Conclusion webhook** — Comprehensive session summary
|
|
- 📱 **NTFY** — Mobile notifications for critical issues
|
|
|
|
---
|
|
|
|
## 🎛️ Advanced Configuration
|
|
|
|
### **Multiple Webhooks**
|
|
```json
|
|
{
|
|
"notifications": {
|
|
"webhook": {
|
|
"enabled": true,
|
|
"url": "https://discord.com/api/webhooks/.../errors-channel"
|
|
},
|
|
"conclusionWebhook": {
|
|
"enabled": true,
|
|
"url": "https://discord.com/api/webhooks/.../summary-channel"
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
### **Channel Organization**
|
|
|
|
#### **Recommended Discord Structure**
|
|
- **#rewards-errors** — Real-time error notifications (webhook)
|
|
- **#rewards-summary** — End-of-run summaries (conclusionWebhook)
|
|
- **#rewards-logs** — Detailed text logs (manual uploads)
|
|
|
|
#### **Channel Settings**
|
|
- **Notification settings** — Configure per your preference
|
|
- **Webhook permissions** — Limit to specific channels
|
|
- **Message history** — Enable for tracking trends
|
|
|
|
---
|
|
|
|
## 🔒 Security & Privacy
|
|
|
|
### **Webhook Security Best Practices**
|
|
- 🔐 Use **dedicated Discord server** for notifications
|
|
- 🎯 **Limit permissions** to specific channels only
|
|
- 🔄 **Regenerate URLs** if compromised
|
|
- 🚫 **Don't share** webhook URLs publicly
|
|
|
|
### **Data Transmission**
|
|
- ✅ **Summary statistics** only
|
|
- ✅ **Points and email** addresses
|
|
- ❌ **No passwords** or sensitive tokens
|
|
- ❌ **No personal information** beyond emails
|
|
|
|
### **Data Retention**
|
|
- 💾 **Discord stores** messages per server settings
|
|
- 🗑️ **No local storage** by the script
|
|
- ✂️ **Manual deletion** possible anytime
|
|
- 📝 **Webhook logs** may be retained by Discord
|
|
|
|
---
|
|
|
|
## 🧪 Testing & Debugging
|
|
|
|
### **Manual Webhook Test**
|
|
```bash
|
|
curl -X POST \
|
|
-H "Content-Type: application/json" \
|
|
-d '{"content":"Test message from rewards script"}' \
|
|
"YOUR_WEBHOOK_URL_HERE"
|
|
```
|
|
|
|
### **Script Debug Mode**
|
|
```powershell
|
|
$env:DEBUG_REWARDS_VERBOSE=1; npm start
|
|
```
|
|
|
|
### **Success Indicators**
|
|
```
|
|
[INFO] Sending conclusion webhook...
|
|
[INFO] Conclusion webhook sent successfully
|
|
```
|
|
|
|
### **Error Messages**
|
|
```
|
|
[ERROR] Failed to send conclusion webhook: Invalid webhook URL
|
|
```
|
|
|
|
---
|
|
|
|
## 🛠️ Troubleshooting
|
|
|
|
| Problem | Solution |
|
|
|---------|----------|
|
|
| **No summary received** | Check webhook URL; verify Discord permissions |
|
|
| **Malformed messages** | Validate webhook URL; check Discord server status |
|
|
| **Missing information** | Ensure script completed; check for execution errors |
|
|
| **Rate limited** | Single webhook per session prevents this |
|
|
|
|
### **Common Fixes**
|
|
- ✅ **Webhook URL** — Must be complete Discord webhook URL
|
|
- ✅ **Channel permissions** — Webhook must have send permissions
|
|
- ✅ **Server availability** — Discord server must be accessible
|
|
- ✅ **Script completion** — Summary only sent after full execution
|
|
|
|
---
|
|
|
|
## ⚡ Performance Impact
|
|
|
|
### **Resource Usage**
|
|
- 📨 **Single HTTP request** at script end
|
|
- ⚡ **Non-blocking operation** — No execution delays
|
|
- 💾 **Payload size** — Typically < 2KB
|
|
- 🌐 **Delivery time** — Usually < 1 second
|
|
|
|
### **Benefits**
|
|
- ✅ **No impact** on account processing
|
|
- ✅ **Minimal memory** footprint
|
|
- ✅ **No disk storage** required
|
|
- ✅ **Negligible bandwidth** usage
|
|
|
|
---
|
|
|
|
## 🎨 Customization
|
|
|
|
### **Embed Features**
|
|
- 🎨 **Color-coded** status indicators
|
|
- 🎭 **Emoji icons** for visual clarity
|
|
- 📊 **Structured fields** for easy reading
|
|
- ⏰ **Timestamps** and duration info
|
|
|
|
### **Discord Integration**
|
|
- 💬 **Thread notifications** support
|
|
- 👥 **Role mentions** (configure in webhook)
|
|
- 🔍 **Searchable messages** for history
|
|
- 📂 **Archive functionality** for records
|
|
|
|
---
|
|
|
|
## 🔗 Related Guides
|
|
|
|
- **[NTFY Notifications](./ntfy.md)** — Mobile push notifications
|
|
- **[Getting Started](./getting-started.md)** — Initial setup and configuration
|
|
- **[Buy Mode](./buy-mode.md)** — Manual purchasing with monitoring
|
|
- **[Security](./security.md)** — Privacy and data protection |