Skip to content

Commit dacc017

Browse files
committed
Document on_disconnect
1 parent 118cd04 commit dacc017

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

pyrogram/client/methods/decorators/on_disconnect.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@
2222

2323
class OnDisconnect(BaseClient):
2424
def on_disconnect(self):
25-
# TODO: Documentation
25+
"""Use this decorator to automatically register a function for handling
26+
disconnections. This does the same thing as :meth:`add_handler` using the
27+
DisconnectHandler.
28+
"""
29+
2630
def decorator(func):
2731
self.add_handler(pyrogram.DisconnectHandler(func))
2832
return func

0 commit comments

Comments
 (0)