Document DisconnectHandler

This commit is contained in:
Dan 2018-05-31 13:13:38 +02:00
parent 0dc5ecf28c
commit 118cd04a73

View File

@ -20,6 +20,19 @@ from .handler import 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):
super().__init__(callback)