Create a Telegram bot using scratch.mit.edu (proof of concept)
- Python 3.6 or higher
- Requestly browser extension
$ python -m pip install -r requirements.txt
- Open Requestly settings
- Add a "Replace Host" rule
- Replace
https://translate-service.scratch.mit.edu/
withhttp://localhost:5000/
and save rule settings - Replace
api_id
,api_hash
(you can obtain those on https://my.telegram.org/apps),bot_token
(Obtain it from BotFather) parameters inClient
instance inmain.py
$ python main.py
- Open https://scratch.mit.edu/projects/504626732 or create your own project uploading
Scratch Telegram Bot.sb3
on Scratch. - Run the project and send
/start
to your Telegram bot
Thanks to ShishCat for telling me how to MITM Scratch's translator plugin, Dan for his amazing library (Pyrogram).