I am getting all messages of a Telegram channel via GetHistoryRequest. I would like to run a script every day, which gives me the new messages. Is it possible to reverse the order of the messages inside GetHistoryRequest? I have seen an additional property reverse=True, but this gives me an error message. Here is the code (which is available online)
history = client(GetHistoryRequest(
peer=my_channel,
offset_id=0,
offset_date=None,
add_offset=0,
limit=limit,
max_id=0,
min_id=0,
hash=0
))
2
Answers
According to the docs
GetHistoryRequest
does not have areverse
argument. But, the methodclient.iter_messages
doesThis works here . Downaload 100 message