mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-01 05:04:51 +00:00
Add run() method
This commit is contained in:
parent
ffd67ed408
commit
e3299bb3b7
1 changed files with 10 additions and 0 deletions
|
|
@ -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 a new issue