示例#1
0
        def decorator(func: callable) -> Handler:
            handler = pyrogram.DisconnectHandler(func)

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

            return handler
示例#2
0
 def decorator(func):
     self.add_handler(pyrogram.DisconnectHandler(func))
     return func
        def decorator(func: Callable) -> Callable:
            if isinstance(self, pyrogram.Client):
                self.add_handler(pyrogram.DisconnectHandler(func))

            return func