TheDocumentation 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.
Config dataclass manages all bot settings loaded from environment variables.
Config Class
- Definition
- Usage
Configuration Fields
Required Fields
Discord bot token for authentication. Must be set via
DISCORD_TOKEN environment variable.Discord server (guild) ID to export messages from. Must be set via
GUILD_ID environment variable.Optional Fields
API key for Claude/Anthropic API integration. Required for digest generation. Set via
ANTHROPIC_API_KEY environment variable.Path to Dokploy volume for persistent storage. If set and exists, digests are saved here. Set via
DOKPLOY_VOLUME_PATH environment variable.GitHub repository URL for pushing digests (e.g.,
https://github.com/user/repo.git). Set via GITHUB_REPO_URL environment variable.GitHub personal access token for repository authentication. Set via
GITHUB_TOKEN environment variable.Default Configuration
Timezone for timestamps. Automatically handles DST transitions.
Claude model to use for digest generation.
Maximum tokens for Claude API response.
Default time range in hours for exports when not specified.
Minimum allowed hours for export time range.
Maximum allowed hours for export time range (30 days).
Local directory for saving JSON exports.
Directory name for saving digest markdown files.
Character limit for digest preview in Discord messages.
Hour of day (0-23) for scheduled digest generation in Eastern Time. Default is midnight (12am ET).
Class Methods
from_env()
- Signature
- Usage
python-dotenv.
A fully initialized Config instance with values loaded from environment variables.
ValueError: IfDISCORD_TOKENorGUILD_IDenvironment variables are not set.
| Variable | Required | Description |
|---|---|---|
DISCORD_TOKEN | Yes | Discord bot authentication token |
GUILD_ID | Yes | Discord server ID (numeric) |
ANTHROPIC_API_KEY | No | Claude API key for digest generation |
DOKPLOY_VOLUME_PATH | No | Path to persistent volume |
GITHUB_REPO_URL | No | GitHub repo URL for pushing digests |
GITHUB_TOKEN | No | GitHub authentication token |
Example .env File
The bot automatically loads
.env file from the current directory when Config.from_env() is called.