mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-16 20:59:29 +00:00
Document DisconnectHandler
This commit is contained in:
parent
0dc5ecf28c
commit
118cd04a73
@ -20,6 +20,19 @@ from .handler import Handler
|
||||
|
||||
|
||||
class DisconnectHandler(Handler):
|
||||
# TODO: Documentation
|
||||
"""The Disconnect handler class. Used to handle disconnections. It is intended to be used with
|
||||
:meth:`add_handler() <pyrogram.Client.add_handler>`
|
||||
|
||||
|
||||
Args:
|
||||
callback (``callable``):
|
||||
Pass a function that will be called when a disconnection occurs. It takes *(client)*
|
||||
as positional argument (look at the section below for a detailed description).
|
||||
|
||||
Other parameters:
|
||||
client (:obj:`Client <pyrogram.Client>`):
|
||||
The Client itself. Useful, for example, when you want to change the proxy before a new connection
|
||||
is established.
|
||||
"""
|
||||
def __init__(self, callback: callable):
|
||||
super().__init__(callback)
|
||||
|
Loading…
Reference in New Issue
Block a user