2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-28 21:07:59 +00:00

Document on_disconnect

This commit is contained in:
Dan 2018-05-31 13:15:47 +02:00
parent 118cd04a73
commit dacc0173f1

View File

@ -22,7 +22,11 @@ from ...ext import BaseClient
class OnDisconnect(BaseClient): class OnDisconnect(BaseClient):
def on_disconnect(self): 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): def decorator(func):
self.add_handler(pyrogram.DisconnectHandler(func)) self.add_handler(pyrogram.DisconnectHandler(func))
return func return func