# ๐ 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