.env file at the root of your project.
Required Variables
Your Discord bot token. Get this from the Discord Developer Portal.
PostgreSQL database connection string. Format:
postgres://username:password@host/databaseMake sure PostgreSQL is installed and running before starting the bot.
The command prefix for the bot. This is also configured in
config.json.Email Configuration
The email address that verification emails will be sent from.
SMTP authentication username (usually your email address).
SMTP authentication password.
SMTP server hostname.
SMTP server port (typically 587 for TLS or 465 for SSL).
Optional Configuration
Configure logging levels for the bot. Recommended for debugging and monitoring.Available log levels:
error- Only errorswarn- Warnings and errorsinfo- General information (recommended)debug- Detailed debugging informationtrace- Very verbose tracing
InfluxDB authentication token for logging bot metrics (latency, etc.).
This is used for monitoring bot performance. The bot will still work without it.
Example .env File
.env