Modeeration bot for @codenight
- Clone this repository
- Install dependencies:
pip install -r requirements.txt - Copy
.env.exampleto.envand add your Telegram bot token:TELEGRAM_BOT_TOKEN=your_telegram_bot_token_here - Run the bot:
python main.py
/start- Start the bot/hello- Get a hello message/help- Show help information/stats- Show bot statistics (admin only)/enable_janitor- Enable message filtering/disable_janitor- Disable message filtering/status- Display current chat settings
/add_filter [pattern]- Add a regex pattern to filter messages/remove_filter [pattern]- Remove a regex pattern/list_filters- List all configured filter patterns/regex_help- Show examples of useful regex patterns
- Automatic Message Filtering: Delete messages matching configured regex patterns
- Self-Destructing Notifications: When a message is deleted, a notification appears and disappears after 1 minute
- Persistence: All settings are stored and survive bot restarts
- Role-Based Access: Admin commands are restricted
main.py: Bot entry pointhandlers/: Command handlersbasic.py: Basic user commandsadmin.py: Admin-only commandsconversation.py: Chat settings managementfilters.py: Message filtering system
utils/: Utility functionslogger.py: Logging setup