.env file or passed directly to the Docker container.
Configuration File
When running pwr-bot, create a.env file in the same directory as the binary or use it with Docker. You can download the .env-example file as a starting point.
Required Variables
These variables must be set for pwr-bot to function.Your Discord bot token obtained from the Discord Developer Portal.Get this from: Bot tab → Reset Token
Your Discord user ID. This grants access to admin commands like
!register_owner.To find your user ID:- Enable Developer Mode in Discord (User Settings → Advanced → Developer Mode)
- Right-click your username and select “Copy User ID”
Optional Variables
These variables have default values and can be customized as needed.Discord Configuration
Your Discord Application ID from the Developer Portal.Required for: Command autoregistration feature (when
ENABLE_AUTOREGISTER_CMD=true)Get this from: General Information tab → Application IDFeature Toggles
Enable voice channel activity tracking and heartbeat monitoring.When enabled, the bot tracks time spent in voice channels and provides leaderboard commands.
Enable feed polling and publishing for anime/manga subscriptions.When enabled, the bot checks for updates from AniList, MangaDex, and Comick at the interval specified by
POLL_INTERVAL.Enable the autoregister command feature.When enabled, users with appropriate permissions can use
!register to automatically register slash commands.Requires: DISCORD_APPLICATION_ID to be setPaths and Storage
Path to the SQLite database file.The bot will create this file if it doesn’t exist. Ensure the parent directory exists and is writable.
SQLite database connection URL.Used internally by SQLx. Should match the
DATABASE_PATH in URL format.Directory for storing data files including the database.The bot will create this directory if it doesn’t exist.
Directory for storing application log files.The bot will create this directory if it doesn’t exist.
Behavior Settings
Feed polling interval in seconds.How often the bot checks for new anime/manga updates. Minimum recommended: 60 seconds.
Lower values mean more frequent updates but higher API usage.
Logging level configuration.Controls the verbosity of application logs. Common values:
pwr_bot=error- Only errorspwr_bot=warn- Warnings and errorspwr_bot=info- General information (recommended)pwr_bot=debug- Detailed debugging informationpwr_bot=trace- Very verbose debugging
Docker-Specific Configuration
When using Docker, environment variables can be passed in multiple ways:- Docker Compose
- Docker Run with --env-file
- Docker Run with -e flags
Edit the Then start with:
.env file in the same directory as docker-compose.yml:Example Configurations
Minimal Configuration
Minimal Configuration
Minimal setup with only required variables:
Production Configuration
Production Configuration
Recommended production setup with custom paths:
Development/Debug Configuration
Development/Debug Configuration
Setup for development with verbose logging:
Feed-Only Configuration
Feed-Only Configuration
Run only feed subscription features without voice tracking:
Next Steps
After configuring your environment:-
Choose your installation method:
- Docker Installation (recommended)
- Manual Installation
- See the command registration steps in the Quick Start guide