2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-28 12:57:52 +00:00

Update docs

This commit is contained in:
Dan 2018-02-15 21:28:45 +01:00
parent e7cb51e056
commit 54ff739c82
2 changed files with 6 additions and 3 deletions

View File

@ -14,8 +14,9 @@ Client
start
stop
idle
set_event_handler
set_update_handler
send
resolve_peer
get_me
send_message
forward_messages

View File

@ -29,8 +29,9 @@ Here's a complete example on how to set it up:
main()
The last line of the main() function, :obj:`client.idle() <pyrogram.Client.idle>`, is not strictly necessary but highly
recommended; it will block your script execution until you press :obj:`CTRL`:obj:`C` and automatically call the
:obj:`stop <pyrogram.Client.stop>` method which stops the Client and gently close the underlying connection.
recommended when using the update handler; it will block your script execution until you press :obj:`CTRL`:obj:`C` and
automatically call the :obj:`stop <pyrogram.Client.stop>` method which stops the Client and gently close the underlying
connection.
Examples
--------
@ -41,6 +42,7 @@ Examples
from pyrogram.api import types
def update_handler(client, update, users, chats):
if isinstance(update, types.UpdateNewMessage): # Filter by UpdateNewMessage (PM and Groups)
message = update.message # type: types.Message