Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pylerts logo

pylerts

A lightweight python discord-bot for automatic assignment and updating of roles based on donations from DonationAlerts in real time. Say no to patreon/boosty!

Python Version Discord.py Version Socket.io


🪧 About

pylerts listens to the donation stream from your DonationAlerts account via WebSocket connection. As soon as a donation is received, the bot searches for the sender on your Discord server and applies the role assignment rules defined in the configuration file.

✨ Features

  • Real-time! Connection via the official WebSocket widget from DonationAlerts ensures instant reaction.
  • Flexible rule system! Ability to bind role assignment to donation amount and currency.
  • Multiple role support! One rule can give a user multiple Discord roles at once.
  • Tier system! Automatic removal of old roles when a user reaches a higher level (e.g., replacing tier 1 with tier 2 on a large donation).

🗺️ Roadmap

Here are the planned features for the upcoming releases of pylerts:

  • Cumulative Donation System (CDS)
    • Add a lightweight SQLite database to track and sum up donations over time, allowing users to unlock roles progressively
  • Discord embeds and public logs
    • Send beautiful public thank-you cards to a dedicated channel and set up admin logs to track role grant events
  • Dockerization
    • Provide a Dockerfile and docker-compose.yml to enable one-command deployment on any Linux VPS/server

pylerts install

⚙️ Install and run (Windows)

Requirements

  • Python 3.11 or higher (uses the built-in tomllib library for reading configuration).
  • Discord bot token with Server Members Intent enabled in the Discord developer panel.
  • DonationAlerts widget token (You can find it here.).

Installation

  • Optional: make a directory for pylerts.
mkdir pylerts
cd pylerts
  • Clone the repository.
git clone https://github.com/zito1337/pylerts.git
  • After cloning, navigate to the pylerts directory.
cd pylerts
  • Install the required dependencies manually or use the provided requirements.txt file.
pip install -r requirements.txt
  • Run the bot and wait until it initializes!
python -m src.pylerts_main

⚙️ Install and run (Linux / Arch)

Requirements

  • same shit as windows...

Installation

  • Optional: make a directory for pylerts.
mkdir pylerts
cd pylerts
  • Clone the repository.
git clone https://github.com/zito1337/pylerts.git
  • After cloning, navigate to the pylerts directory.
cd pylerts
  • Since Arch Linux blocks global pip installations, set up and activate a Python virtual environment:
python -m venv venv
source venv/bin/activate
  • Install the required dependencies inside the virtual environment using the provided requirements.txt file.
pip install -r requirements.txt
  • Run the bot and wait until it initializes!
python -m src.pylerts_main

⚙️ Install and run (Linux / Alpine)

Requirements

  • System packages: Git, Python, and Pip (git, python3, py3-pip). Install them on Alpine via:
    apk add git python3 py3-pip
  • aaand... pretty same shit as windows

Installation

  • Optional: make a directory for pylerts.
mkdir pylerts
cd pylerts
  • Clone the repository.
git clone https://github.com/zito1337/pylerts.git
  • After cloning, navigate to the pylerts directory.
cd pylerts
  • Since Alpine Linux (from v3.19+) blocks global pip installations, set up and activate a Python virtual environment:
python3 -m venv venv
source venv/bin/activate
  • Install the required dependencies inside the virtual environment using the provided requirements.txt file.
pip install -r requirements.txt
  • Run the bot and wait until it initializes!
python3 -m src.pylerts_main

⚙️ Install and run (FreeBSD)

Requirements

  • System packages: Git, Python 3.11, and Pip (git, python3, py311-pip). Install them on FreeBSD via:
    sudo pkg install git python3 py311-pip
    or
    su -
    pkg install git python3 py311-pip
  • same shit as windows again...

Installation

  • Optional: make a directory for pylerts.
mkdir pylerts
cd pylerts
  • Clone the repository.
git clone https://github.com/zito1337/pylerts.git
  • After cloning, navigate to the pylerts directory.
cd pylerts
  • To avoid conflicts with system packages managed by pkg, set up and activate a Python virtual environment:
python3 -m venv venv
source venv/bin/activate
  • Install the required dependencies inside the virtual environment using the provided requirements.txt file.
pip install -r requirements.txt
  • Run the bot and wait until it initializes!
python3 -m src.pylerts_main

About

A lightweight python discord-bot for automatic assignment and updating of roles based on donations from DonationAlerts in real time. Say no to patreon/boosty!

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages