mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-28 12:57:52 +00:00
Document on_disconnect
This commit is contained in:
parent
118cd04a73
commit
dacc0173f1
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user