A Telegram bot that moderates group chats by filtering inappropriate words, issuing warnings, and applying progressive penalties. Supports English & Persian.
✅ Multi-language support (English & Persian)
✅ Monitors group messages for filtered words
✅ Progressive penalty system (flexible & configurable):
- 1st offense → Warning
- 2nd offense → Warning
- 3rd offense → 1-hour mute
- 4th offense → 3-hour mute
- 5th offense → 6-hour mute
- 6th offense → 12-hour mute
- 7th offense → 1-day mute
- 8th offense → 3-day mute
- 9th offense → 1-week mute
- 10th offense → Permanent mute
✅ Admin private reports (violations are sent to the admin's private chat)
✅ Admin panel in private chat with buttons for:
- 🔹 Add words to blacklist
- 🔹 Remove words from blacklist
- 🔹 View current blacklist
- 🔹 View user warnings and remove them
- 🔹 Reset user warnings
✅ Environment-based configuration
✅ User violation tracking in database
- Clone the repository:
git clone https://github.com/bavanDA/Telegram-moderator.git
cd telegram-moderation-bot-
Change
.env.examplefile toenv -
Start the bot:
python -m venv env && env\Scripts\activate
pip install -r requirements.txt
python main.pyYou can also run the bot using Docker. Follow these steps:
-
Rename
env.exampleto.envand update the environment variables as needed -
Build and run the Docker containers using Docker Compose:
docker compose up --build -d