Priler/samurai
Simple, yet effective auto-moderator bot for Telegram. With reports, logs, profanity filter, anti-spam AI, NSFW detection AI and more :3
What it solves
Samurai is an automated moderation bot for Telegram groups, designed to keep chats clean and safe by automating the removal of unwanted content and managing user behavior through a reputation system.
How it works
The bot integrates several AI and rule-based systems to moderate content in real-time:
- Content Filtering: It uses ML-based spam detection for new users, a profanity filter for Russian and English text, and a dedicated NSFW detection model to analyze images and profile photos.
- User Management: It implements a reputation system where users earn points for positive participation and a reporting system that allows users to flag messages for admin review.
- Infrastructure: The bot is built with Python and uses Pydantic for configuration, Project Fluent for internationalization (supporting English and Russian), and an asynchronous database for state management.
- Resource Management: An
ml_managerservice handles the lazy-loading and unloading of ML models from RAM to optimize memory usage.
Who it’s for
Telegram group administrators who want to reduce the manual effort of moderation by automating spam, profanity, and NSFW content detection.
Highlights
- ML-Powered Moderation: Combines spam detection and NSFW image analysis using specialized ML models.
- Multi-language Support: Full internationalization via Project Fluent for both user-facing messages and announcements.
- Detailed Admin Tools: Includes a comprehensive set of commands for banning, unbuning, and tracking top violators of spam and profanity.
- Containerized Deployment: Ready for Docker deployment with built-in health checks for orchestration.
Related
- Project
- Project
- Dispatch
- Dispatch
- Project