mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-05 20:50:22 +03:00
Merge b2fb6b6a8e
into 69d283a296
This commit is contained in:
commit
1c59401a49
16
README.rst
16
README.rst
|
@ -41,8 +41,8 @@ Creating a client
|
|||
client.start()
|
||||
|
||||
|
||||
Doing stuff
|
||||
-----------
|
||||
Working with Telethon
|
||||
---------------------
|
||||
|
||||
.. code:: python
|
||||
|
||||
|
@ -54,6 +54,18 @@ Doing stuff
|
|||
client.download_profile_photo('me')
|
||||
messages = client.get_message_history('username')
|
||||
client.download_media(messages[0])
|
||||
|
||||
|
||||
Responding to events
|
||||
--------------------
|
||||
|
||||
.. code:: python
|
||||
|
||||
from telethon import events
|
||||
|
||||
@client.on(events.NewMessage(incoming=True))
|
||||
def echo(event):
|
||||
event.reply(event.text)
|
||||
|
||||
|
||||
Next steps
|
||||
|
|
Loading…
Reference in New Issue
Block a user