I’m using Telethon for a simple python script able to manage the telegram icoming message for a user and to store them inside a file.
Then I would like to scroll the file and send the message to someone else.
How can I do this?
In my opinion this issue is a type issue:
when I write the file appending a new incoming message, I stringify the event message {Message}.
When I read a file line I have no longer a {Message} struct but I read a String.
How can I "parse" this String according to the {Message} format?
I also tried with JSON but I failed!
<<Sorry, I’m a python noob, C rules!>>
2
Answers
its been 10 months but i just readed 🙂 im using this code:
i use function like this to print me messages from telegram to a file, one under another:
mayby that would be helpful for someone.
i run it in anaconda prompt, using comand "activate" before python script, for functions to work propertly.
You can use smth’g list like that.
It can be id, name, or link.