mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-16 20:59:29 +00:00
Add run() method
This commit is contained in:
parent
ffd67ed408
commit
e3299bb3b7
@ -302,6 +302,16 @@ class Client(Methods, BaseClient):
|
||||
|
||||
self.stop()
|
||||
|
||||
def run(self):
|
||||
"""Use this method to automatically :meth:`start` and :meth:`idle` a Client.
|
||||
Requires no parameters.
|
||||
|
||||
Raises:
|
||||
:class:`Error <pyrogram.Error>`
|
||||
"""
|
||||
self.start()
|
||||
self.idle()
|
||||
|
||||
def add_handler(self, handler, group: int = 0):
|
||||
"""Use this method to register an update handler.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user