Discord bot that sends feed update notifications to your DM or server.
- Features
- Discord Setup
- Installation & Usage
- Command Registration
- Configuration
- Notes and Tips
- Bug Reports and Feature Requests
- License
- Multi-Source Support: Subscribe to updates from AniList, MangaDex, and Comick.
- Flexible Notifications: Receive updates via Discord Direct Messages (DMs) or server channels.
- Lightning Fast: (Metrics based on v0.1.15)
- Application initialization: ~0.3s
- Bot initialization: ~2s
- Lightweight: (Metrics based on v0.1.15)
- Binary size: 21.2 MB
- Docker image: 46.4 MB
Before running the bot, you need to create a Discord application:
- Go to the Discord Developer Portal.
- Create a New Application and give it a name.
- Navigate to the Bot tab:
- Click Reset Token to get your
DISCORD_TOKEN. - Under Privileged Gateway Intents, enable Message Content Intent.
- Click Reset Token to get your
- Navigate to OAuth2 -> URL Generator:
- Select Scopes:
bot,applications.commands. - Select Bot Permissions:
View ChannelsSend MessagesEmbed LinksRead Message History(Required for the!registercommand)
- Select Scopes:
- Use the generated URL to invite the bot to your server.
You can run this bot using Docker (recommended) or manually using the pre-compiled binary.
-
Clone the repository
git clone https://github.com/FAZuH/pwr-bot cd pwr-bot -
Configuration Copy the example environment file and configure it:
cp .env-example .env # Edit .env with your text editor -
Run Start the bot in detached mode:
docker compose up -d
If you prefer to run the container directly without docker compose or cloning the full repository source code:
-
Prepare Directories Create directories to persist data and logs:
mkdir -p pwr-bot/data pwr-bot/logs cd pwr-bot -
Run Start the container (make sure you replace the placeholder values):
docker run -d \ --name pwr-bot \ --restart unless-stopped \ -v $(pwd)/data:/app/data \ -v $(pwd)/logs:/app/logs \ -e DISCORD_TOKEN="your_discord_token_here" \ -e ADMIN_ID="your_admin_id_here" \ ghcr.io/fazuh/pwr-bot:latest
Alternatively, you can use an env file:
# Assuming you have a .env file in the current directory docker run -d \ --name pwr-bot \ --restart unless-stopped \ --env-file .env \ -v $(pwd)/data:/app/data \ -v $(pwd)/logs:/app/logs \ ghcr.io/fazuh/pwr-bot:latest
-
Download the latest binary Download the latest binary for your platform from the GitHub Releases.
-
Configuration Download the .env-example file, rename it to
.envin the same directory as the binary, and configure it with your text editor. -
Run
# If on Linux/macOS, make the binary executable first chmod +x pwr-bot ./pwr-bot
After the bot is running and invited to your server, you need to register the slash commands:
- In any channel the bot has access to, type
!register_owner. - The bot will respond with buttons to register the commands.
- Click Register in guild (immediate) or Register globally (may take up to an hour).
Note
Note that !register_owner command requires your Discord user ID to match environment variable's ADMIN_ID.
Users in other servers with "Administrator" or "Manage Server" permissions can simply run !register or !unregister.
See .env-example for available configuration options.
| Variable | Description | Default |
|---|---|---|
DISCORD_TOKEN |
Your Discord bot token | Required |
ADMIN_ID |
Discord User ID for admin commands | Required |
POLL_INTERVAL |
Feed polling interval in seconds | 180 |
DATABASE_PATH |
Path to SQLite DB file | ./data/data.db |
LOGS_PATH |
Directory for logs | ./logs |
RUST_LOG |
Log level (e.g., info, debug. Read here for more info) |
pwr_bot=info |
- Database: The application uses SQLite. Migrations are handled automatically on startup.
- Logs: Application logs are stored in the configured
LOGS_PATH(default:logs/directory). - Docker Volumes: If you are using Docker, make sure
data/andlogs/are mounted to persist data and logs between restarts.
You can report bugs or request for features on the issue tracker.
pwr-bot is distributed under the terms of the MIT license.