mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-28 21:07:59 +00:00
Document DisconnectHandler
This commit is contained in:
parent
0dc5ecf28c
commit
118cd04a73
@ -20,6 +20,19 @@ from .handler import Handler
|
|||||||
|
|
||||||
|
|
||||||
class DisconnectHandler(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):
|
def __init__(self, callback: callable):
|
||||||
super().__init__(callback)
|
super().__init__(callback)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user