Exemplo n.º 1
0
        def decorator(func: callable) -> Handler:
            handler = pyrogram.DisconnectHandler(func)

            if self is not None:
                self.add_handler(handler)

            return handler
Exemplo n.º 2
0
 def decorator(func):
     self.add_handler(pyrogram.DisconnectHandler(func))
     return func
Exemplo n.º 3
0
        def decorator(func: Callable) -> Callable:
            if isinstance(self, pyrogram.Client):
                self.add_handler(pyrogram.DisconnectHandler(func))

            return func