Add run() method

This commit is contained in:
Dan 2018-06-22 13:10:09 +02:00
parent ffd67ed408
commit e3299bb3b7

View File

@ -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.