Giter Club home page Giter Club logo

telegram-reaction-bot's Introduction

Bot for posting reactions to a Telegram post.

Telegram      Pyrogram

Bot puts reaction to new posts in the channel, group or chat. Reactions are set from all connected sessions, as well as automatic subscription to channels from these sessions!

Good stuff 👍:

  • Automatically converts TDATA to a Pyrogram session.
  • Automatically converts a Telethon session to a Pyrogram session.

Launch Instructions

  1. Create an empty directory

  2. git clone https://github.com/kanewi11/telegram-reaction-bot.git ./.

  3. python3 -m venv venv or on windows python -m venv venv.

  4. . venv/bin/activate or on windows \venv\Scripts\activate.

  5. pip install -r requirements.txt or in windows pip install -r requirements_win.txt.

  6. Add your channel name to config.py.

  7. If you plan to use the TDATA converter, go to converters/tdata_to_telethon.py and insert your API_HASH and API_ID (lines 19 and 20).

  8. mkdir sessions and mkdir tdatas (or just create these two folders)

  9. Add the session file and its configuration file to the /sessions directory ( which we created in step 8 ) or tdata files to the /tdatas folder (Note the 7th point). Here is an example:

       your_dir
       └───reactionbot.py
       │
       └───sessions
       │   │   8888888888.ini
       │   │   8888888888.session
       │   │   9999999999.ini
       │   │   9999999999.session
       │   │   98767242365.json
       │   │   98767242365.session
       │   │   ...
       │
       └───tdatas
       │   └─── my_tdata
       │   │   │ key_datas
       │   │   │ ...
       ...
    
  10. nohup python reactionbot.py &

Create a session file manually.

Create a file my_account.json ( the file name can be anything ) in the directory /sessions :

{
    "api_id": "your_api_id",
    "api_hash": "your_api_hash",
    "phone_number": "your_phone_number"
}

After python reactionbot.py, in the console go through the account authorization steps and that's it, the session file will be created, you don't need to do this for the next times.

Where do I get api_id and api_hash?

🔗 Click me.

Sample configuration file

You can add more parameters that pyrogram supports.

sessions/888888888.ini

[pyrogram]
api_id = your_api_id
api_hash = your_api_hash
phone_number = 888888888

# optional parameters
app_version = '8.8.5'
device_model = 'Vertu IVERTU'
system_version = 'Android'

OR ( select one of the variants of the configuration file )

sessions/888888888.json

{
    "api_id": "your_api_id",
    "api_hash": "your_api_hash",
    "phone_number": "your_phone_number",
    ...
}

telegram-reaction-bot's People

Contributors

kanewi11 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.