# ๐Ÿ“Š Discord Conclusion Webhook
**๐ŸŽฏ Comprehensive session summaries via Discord** *Complete execution reports delivered instantly*
--- ## ๐ŸŽฏ 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