Skip to content

This Telegram bot fights spam by automatically filtering out messages containing language-specific spam phrases, while tracking spam statistics for each group chat.

License

Notifications You must be signed in to change notification settings

RGB-Outl4w/zapper-TGAB

Repository files navigation

⚡ Zapper: Telegram Anti-Spam Bot

A Telegram bot built using aiogram that automatically filters spam messages based on language-specific phrases and tracks spam statistics per group chat.

Features

  • Phrase-based spam detection for English and Russian
  • Dynamic spam tracking per group chat that has this bot
  • Supports additional languages by adding new phrases to spam_phrases.txt file
  • Securely stores sensitive information like bot tokens in a .env file

Project Structure

~/
├── .env.example           # Example .env file
├── .gitignore             # To exclude sensitive files and Python caches
├── bot.py                 # Main bot script
├── requirements.txt       # Python dependencies
├── spam_phrases.txt       # Directory for spam phrase lists
├── LICENSE                # MIT license
├── README.md              # Documentation
└── README-ru.md           # Documentation on Russian

Setup Instructions

  1. Clone the repository:

    git clone https://github.com/RGB-Outl4w/zapper-TGAB.git
    cd zapper-TGAB
  2. Create and configure the .env file:

  • [OPTIONAL] Copy the .env.example file to .env:
cp .env.example .env
  • Edit the .env file to include your bot token:
BOT_TOKEN=your-bot-token-here
  1. Install the dependencies: Make sure you have Python installed. Then, install the required libraries:

    pip install -r requirements.txt
  2. Add spam phrases: Add spam phrases to the spam_phrases.txt and other files as needed. Each phrase should be on a new line and formatted in the following way:

    language:phrase
    
  3. Run the bot:

    python bot.py