Very work in progress python app to automatically open telegram links in web browser
Due to limitations of the Telethon api the notification can be between 5 and 60 seconds late: LonamiWebs/Telethon#237
Use at own risk!
- Download Python 3.8.x . Before installing, make sure to check “Add Python to PATH”.
- Once installed, open CMD and type:
pip install Telethon
pip install asyncio
pip install pyyaml
pip install playsound
- Clone the repo using your favourite git application (I'm partial to Github Desktop for Windows users)
- Copy config_example.yaml and rename it to config.yml
- Replace the placeholders with the values for the api_id, api_hash and the telegram channels and save
- cd to the folder from command line and run
python listen.py
- put your phone number associated with your telegram account then confirm with the code that you'll receive on your phone.
- Done.
https://docs.telethon.dev/en/latest/basic/signing-in.html
After completing the configuration of config.yml run the getchannelids.py script (python getchannelids.py) The groupid will have this format:
-1001158879711
This is it. You can add it to the config.yml now. You can add more than one to the config.yml, just need to make sure the indent is correct. Example:
channels:
- -1001466115668
- -1001158879711
asyncio, Telethon, pyyaml, playsound
This was designed for and only tested on windows.
This script is a combination of the work of clearyy, Vincent1705, Smidelis and my own work Based on: https://github.com/Smidelis/discord-link-opener