2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-29 05:18:10 +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 start
stop stop
idle idle
set_event_handler set_update_handler
send send
resolve_peer
get_me get_me
send_message send_message
forward_messages forward_messages

View File

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