From 118cd04a73c0fd23ddcbd9ac8ce8947fe8b2b37b Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Thu, 31 May 2018 13:13:38 +0200 Subject: [PATCH] Document DisconnectHandler --- pyrogram/client/handlers/disconnect_handler.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/pyrogram/client/handlers/disconnect_handler.py b/pyrogram/client/handlers/disconnect_handler.py index 67d0ae02..71123248 100644 --- a/pyrogram/client/handlers/disconnect_handler.py +++ b/pyrogram/client/handlers/disconnect_handler.py @@ -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() ` + + + 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 `): + 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)