コード例 #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
コード例 #3
0
        def decorator(func: Callable) -> Callable:
            if isinstance(self, pyrogram.Client):
                self.add_handler(pyrogram.DisconnectHandler(func))

            return func