How to call a the python code when a new message is delivered from telethon API
02:26 14 Jul 2020

How can I call some Python code when a new message is delivered from the Telethon API? I need to run the code all the day so that I can do my processing from Python code.

  1. How to use this? @client.on(events.NewMessage(chats=channel, incoming=True))
  2. Do I need run the scheduler to check this?

I am using history = client(GetHistoryRequest) method.

telethon