Welcome to Telegram Spam Filter Bot! This project aims to provide a robust solution for detecting spam messages within Telegram groups. By utilizing TF-IDF vectorizer and a comprehensive database of sample spam messages, this bot effectively identifies and filters out spam, ensuring a cleaner and more enjoyable group chatting experience.
Click @spam_filter_robot to open Bot in Telegram.
👋 Help Wanted: We are looking for contributors to help improve the bot's spam detection accuracy and add new features. If you are interested, please check out the Contributing section below.
Our mission is to protect users from scammers and maintain a clean chat space within Telegram groups by leveraging advanced natural language processing techniques.
- Spam Detection: Utilizes TF-IDF vectorizer to accurately identify spam messages.
- Comprehensive Database: Includes a vast database of sample spam messages for improved detection accuracy.
- Real-time Filtering: Filters out spam messages in real-time, ensuring a spam-free environment for group members.
- User-friendly Interface: Offers a seamless and intuitive user experience for admins to report spam messages.
- Add the bot to your group.
- Grant the bot admin privileges for deleting messages.
- The bot will automatically start filtering spam messages in the group.
- If you want to report a message as spam, simply reply to the message with
/spam
.
To run the Telegram Spam Detector Bot locally, follow these steps:
- Clone this repository:
git clone https://github.com/talyguryn/antispambot.git
- Copy
.env.example
to.env
and replace the values with your own:
cp .env.example .env
-
Obtain a Telegram Bot API token from BotFather and replace
BOT_TOKEN
in.env
with your token. -
Also replace
ADMIN_CHAT_ID
with your Telegram user ID to get report messages. You can get your user ID by sending/id
to userinfobot. -
Install dependencies and run the bot:
yarn install
yarn start
You can also use Docker via docker-compose to run the bot in a containerized environment.
docker-compose up
- Start using the bot in your Telegram group!
Contributions are welcome! If you have any ideas, bug fixes, or improvements, feel free to open an issue or submit a pull request.