mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-04 14:24:51 +00:00
Document DisconnectHandler
This commit is contained in:
parent
0dc5ecf28c
commit
118cd04a73
1 changed files with 14 additions and 1 deletions
|
|
@ -20,6 +20,19 @@ from .handler import Handler
|
||||||
|
|
||||||
|
|
||||||
class DisconnectHandler(Handler):
|
class DisconnectHandler(Handler):
|
||||||
# TODO: Documentation
|
"""The Disconnect handler class. Used to handle disconnections. It is intended to be used with
|
||||||
|
:meth:`add_handler() <pyrogram.Client.add_handler>`
|
||||||
|
|
||||||
|
|
||||||
|
Args:
|
||||||
|
callback (``callable``):
|
||||||
|
Pass a function that will be called when a disconnection occurs. It takes *(client)*
|
||||||
|
as positional argument (look at the section below for a detailed description).
|
||||||
|
|
||||||
|
Other parameters:
|
||||||
|
client (:obj:`Client <pyrogram.Client>`):
|
||||||
|
The Client itself. Useful, for example, when you want to change the proxy before a new connection
|
||||||
|
is established.
|
||||||
|
"""
|
||||||
def __init__(self, callback: callable):
|
def __init__(self, callback: callable):
|
||||||
super().__init__(callback)
|
super().__init__(callback)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue