Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/trustlessmatt/discord-exporter-bot/llms.txt

Use this file to discover all available pages before exploring further.

Overview

The !digest command combines message export with Claude AI analysis to generate a structured daily digest. It extracts meaningful insights from your team’s Discord conversations, organized by updates, blockers, decisions, and action items.

Command Syntax

!digest [hours]
hours
integer
default:24
Number of hours to analyze for the digest
  • Minimum: 1 hour
  • Maximum: 720 hours (30 days)
  • Default: 24 hours (if not specified)
PrerequisitesThe !digest command requires the ANTHROPIC_API_KEY environment variable to be configured. Without it, the command will fail with:
❌ Failed to generate digest. Check the logs for details.

What It Does

The digest command performs three operations:
  1. Export: Runs the full export process for all channels
  2. AI Analysis: Sends transcript to Claude for intelligent summarization
  3. Markdown Output: Saves formatted digest to Daily Digests/ directory

Claude Model

The bot uses Claude Haiku 4.5 (claude-haiku-4-5-20251001) for fast, cost-effective analysis:
digest_model: str = "claude-haiku-4-5-20251001"
digest_max_tokens: int = 4096
You can customize this in the Config class (bot.py:31).

Digest Structure

Claude analyzes the Discord transcript and extracts:

1. Individual Updates

What each team member worked on, completed, or made progress on.

2. Upcoming Work

Planned tasks and what team members mentioned they’re working on next.

3. Blockers & Challenges

Obstacles, issues, bugs, or requests for help.

4. Key Decisions & Ideas

Important discussions, architectural decisions, or ideas that shouldn’t be lost.

5. Action Items

Specific TODOs, follow-ups, or tasks that need attention.
The bot sends this prompt to Claude:
Analyze this Discord transcript from the last 24 hours and create 
a structured daily digest for a team manager.

Focus on extracting:

1. **Individual Updates** - What each team member worked on, 
   completed, or made progress on
2. **Upcoming Work** - What team members mentioned they're 
   planning to work on next
3. **Blockers & Challenges** - Any obstacles, issues, or 
   requests for help
4. **Key Decisions & Ideas** - Important discussions, decisions 
   made, or ideas that shouldn't be lost
5. **Action Items** - Specific TODOs or follow-ups mentioned

Be concise but don't lose important technical details. 
Organize by person where possible.
If there's very little activity, just note that briefly.

Output Format

Digests are saved as Obsidian-compatible markdown files:
Daily Digests/YYYY-MM-DD - Team Digest.md

Markdown Structure

---
date: 2026-03-04
type: daily-digest
tags: [team, standup, daily]
contributors: 8
messages: 147
channels: 5
---

Example Usage

!digest
Response:
🤖 Generating digest for last 24 hours...
✅ Daily Digest Generated

## Individual Updates

**John (@john_dev)**
- Fixed critical login bug affecting mobile users
- Deployed hotfix to production

**Sarah (@sarah_pm)**
- Completed user research interviews
...

📁 Full digest: `Daily Digests/2026-03-04 - Team Digest.md`
Discord messages have a 2000 character limit. The digest preview is truncated to 1500 characters with ”…” if longer.

Error Handling

API Key Not ConfiguredIf ANTHROPIC_API_KEY is missing:
❌ Failed to generate digest. Check the logs for details.
Check logs for: ANTHROPIC_API_KEY not set
Claude API ErrorIf the API call fails (rate limit, invalid key, network issue):
❌ Failed to generate digest. Check the logs for details.
Check logs for: Error calling Claude API: [error details]
Export FailuresIf the initial export fails, the digest cannot proceed:
❌ Export failed. Check the logs for details.

Configuration

Environment Variables

ANTHROPIC_API_KEY=sk-ant-xxxxx  # Required for !digest
DOKPLOY_VOLUME_PATH=/path       # Optional: Custom digest output location
GITHUB_REPO_URL=https://...     # Optional: Auto-push to GitHub
GITHUB_TOKEN=ghp_xxxxx          # Required if using GitHub sync

Customizing Claude Parameters

Edit bot.py Config class:
digest_model: str = "claude-sonnet-4-20250514"  # Use Sonnet for deeper analysis
digest_max_tokens: int = 8192                   # Longer digests
digest_preview_length: int = 2000               # Longer Discord preview

GitHub Integration

If GITHUB_REPO_URL and GITHUB_TOKEN are configured:
  1. Bot initializes/clones the repository on startup
  2. Each digest is automatically committed and pushed:
    Daily digest for 2026-03-04
    
  3. Enables version history and backup of all digests
  4. Works with Obsidian Git plugin for seamless sync
See bot.py:377-399 for GitHub commit and push implementation.

Technical Details

Pipeline Flow

The digest command runs through run_digest_pipeline() (bot.py:559-578):
  1. perform_export() - Export all messages to JSON
  2. generate_daily_digest() - Send to Claude for analysis
  3. save_digest() - Format and save markdown file
  4. Optional: Git commit and push

Transcript Preparation

Bot messages are filtered out before sending to Claude:
def filter_bot_messages(messages: list) -> list:
    """Filter out messages from bots."""
    return [m for m in messages if not m["author"]["bot"]]
See bot.py:268-284 for transcript formatting logic.