Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/0xetherpunk/telegram-moderator-bot
Telegram chat moderation bot that automatically deletes messages with obscene language.
https://github.com/0xetherpunk/telegram-moderator-bot
admin bot botpy chat-moderation chatbot moderation pybot python python-3 python3 telegram telegram-bot telegrambot
Last synced: about 16 hours ago
JSON representation
Telegram chat moderation bot that automatically deletes messages with obscene language.
- Host: GitHub
- URL: https://github.com/0xetherpunk/telegram-moderator-bot
- Owner: 0xEtherPunk
- License: mit
- Created: 2024-11-16T15:29:45.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-11-19T23:02:08.000Z (about 1 month ago)
- Last Synced: 2024-12-03T19:52:12.056Z (19 days ago)
- Topics: admin, bot, botpy, chat-moderation, chatbot, moderation, pybot, python, python-3, python3, telegram, telegram-bot, telegrambot
- Language: Python
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Telegram Moderator Bot
[Русская версия](README.ru.md)
>Telegram chat moderation bot that automatically removes messages containing profanity.
## Features
- **🔍 Monitoring messages for profanity**
- **🗑️ Automatic removal of messages containing swear words**
- **⚠️ Sending warnings to violators**
- **🔄 Support for checking edited messages**
- **🔡 Detection of masked profanity (transliteration, similar symbols)**## Installation
##### 1. **Clone the repository**:
```
git clone https://github.com/0xEtherPunk/telegram-moderator-bot.git
cd telegram-moderator-bot
```##### 2. **Install dependencies**:
```
pip install aiogram transliterate
```##### 3. Edit `conf.py`:
```
bot_token = "YOUR_BOT_TOKEN" # Get from @BotFather
group_id = "YOUR_GROUP_ID" # Your group ID
```## Launch
```
python main.py
```---
## Configuration
#### Bot Permissions
- Bot must be a group administrator
- Delete message permissions required#### Editing Word Lists
In `filters/words.py` you can configure:
- `bad_words` - list of forbidden words
- `not_bad_words` - list of exceptions
- `en_ru_map` - symbol replacement rules### How it Works
1. Bot monitors all new messages in the group
2. When profanity is detected:
- Deletes the message
- Sends a warning to the user
- Removes the warning after 5 seconds
3. The system checks various masking methods:
- Transliteration
- Similar symbols
- Mixed alphabets> [!important]
> ### Requirements
>
> - Python 3.7+
> - aiogram
> - transliterate