GithubHelp home page GithubHelp logo

messagefilterbot's Introduction

Telegram Autoforwarder

The Telegram Autoforwarder is a Python script that allows you to forward messages from one chat (group or channel) to another based on specified keywords. It works with both groups and channels, requiring only the necessary permissions to access the messages.

Features

  • Forward messages containing specific keywords from one chat to another.
  • Works with both groups and channels.
  • Simple setup and usage.

How it Works

The script uses the Telethon library to interact with the Telegram API. You provide the script with your Telegram API ID, API hash, and phone number for authentication. Then, you can choose to list all chats you're a part of and select the ones you want to use for forwarding messages. Once configured, the script continuously checks for messages in the specified source chat and forwards them to the destination chat if they contain any of the specified keywords.

Keywords

You can specify one or more keywords that, if found in a message, trigger the forwarding process. Keywords are case-insensitive and can be specified during setup.

Setup and Usage

  1. Clone the repository:

    git clone https://github.com/redianmarku/Telegram-Autoforwarder.git
    cd Telegram-Autoforwarder
  2. Install the required dependencies:

    pip install -r requirements.txt
  3. Configure the script:

    • Open TelegramForwarder.py file and provide your Telegram API ID, API hash, and phone number in the appropriate variables.
    • Modify other settings as needed directly in the script.
  4. Run the script:

    python TelegramForwarder.py
  5. Choose an option:

    • List Chats: View a list of all chats you're a part of and select the ones to use for message forwarding.
    • Forward Messages: Enter the source chat ID, destination chat ID, and keywords to start forwarding messages.

Notes

  • Remember to keep your API credentials secure and do not share them publicly.
  • Ensure that you have the necessary permissions to access messages in the chats you want to use.
  • Adjust the script's behavior and settings according to your requirements.

License

This project is licensed under the MIT License.

messagefilterbot's People

Contributors

kaifk468 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.