Telegram bot for group moderation built with Python and Aiogram 3.
- Profanity filter
- Telegram invite link detection
- Warning system
- Auto mute after warning limit
- Progressive mute durations
- Join captcha
- Moderation logs
- User statistics
- Admin moderation commands
- Modular project structure
- Python 3.10+
- Aiogram 3
- SQLAlchemy
- SQLite
- Docker / Docker Compose
Telegram-Moderation-Bot
├── app
│ ├── config
│ ├── database
│ ├── filters
│ ├── handlers
│ ├── middlewares
│ ├── services
│ ├── utils
│ ├── app.py
│ ├── requirements.txt
│ └── .env
├── docker-compose.yml
└── LICENSE
| Command | Description |
|---|---|
/start |
Start bot |
/help |
Show help |
/stats |
Show personal statistics |
/about |
Show project information |
/how_use_bot |
Show setup instructions |
| Command | Description |
|---|---|
/set_admin_chat |
Set moderation log chat |
/unset_admin_chat |
Disable moderation logs |
/warn |
Add warning |
/unwarn |
Remove warning |
/mute |
Mute user |
/unmute |
Remove mute |
/ban |
Ban user |
/unban |
Remove ban |
/addfilter |
Add banned word |
/removefilter |
Remove banned word |
/mute_list |
Show mute history |
/ban_list |
Show ban history |
/warn_list |
Show warning history |
/warn
/mute 30m spam
/ban 7d advertising
/addfilter badword
| Command | Description |
|---|---|
/report |
Report message to admins |
/stats |
Show user statistics |
Clone repository:
git clone https://github.com/kapusta123b/Telegram-Moderation-Bot
cd Telegram-Moderation-BotCreate app/.env:
BOT_TOKEN=your_bot_tokenRun container:
docker-compose up -d --buildStop container:
docker-compose downClone repository:
git clone https://github.com/kapusta123b/Telegram-Moderation-Bot
cd Telegram-Moderation-BotCreate virtual environment:
python -m venv venvActivate virtual environment:
source venv/bin/activatevenv\Scripts\activateInstall dependencies:
pip install -r app/requirements.txtCreate app/.env:
BOT_TOKEN=your_bot_tokenRun bot:
cd app
python app.pyFilter words are stored in:
app/database/banwords.txt
You can also manage filters directly from Telegram using:
/addfilter
/removefilter