pyrofork/docs/source/start/examples/get_chat_history.rst
wulan17 8353e5a2a2
Pyrofork: Full rebrand
Signed-off-by: wulan17 <wulan17@nusantararom.org>
2024-02-06 04:41:59 +07:00

20 lines
No EOL
435 B
ReStructuredText

get_history
===========
This example shows how to get the full message history of a chat, starting from the latest message.
.. code-block:: python
from pyrofork import Client
app = Client("my_account")
async def main():
async with app:
# "me" refers to your own chat (Saved Messages)
async for message in app.get_chat_history("me"):
print(message)
app.run(main())