mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-05 23:04:51 +00:00
Document on_disconnect
This commit is contained in:
parent
118cd04a73
commit
dacc0173f1
1 changed files with 5 additions and 1 deletions
|
|
@ -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…
Reference in a new issue