From dacc0173f1294a53ccc3123fd17c3294b4954cd9 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Thu, 31 May 2018 13:15:47 +0200 Subject: [PATCH] Document on_disconnect --- pyrogram/client/methods/decorators/on_disconnect.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pyrogram/client/methods/decorators/on_disconnect.py b/pyrogram/client/methods/decorators/on_disconnect.py index 230a361c..d1d03723 100644 --- a/pyrogram/client/methods/decorators/on_disconnect.py +++ b/pyrogram/client/methods/decorators/on_disconnect.py @@ -22,7 +22,11 @@ from ...ext import BaseClient class OnDisconnect(BaseClient): def on_disconnect(self): - # TODO: Documentation + """Use this decorator to automatically register a function for handling + disconnections. This does the same thing as :meth:`add_handler` using the + DisconnectHandler. + """ + def decorator(func): self.add_handler(pyrogram.DisconnectHandler(func)) return func