Exemplo n.º 1
0
def init(context: 'Context') -> Iterable[Awaitable[bool]]:
    global config
    User.az, config, User.loop = context.core
    User.bridge = context.bridge
    User._community_helper = CommunityHelper(User.az)
    User.temp_disconnect_notices = config["bridge.temporary_disconnect_notices"]
    return (user.load_session() for user in User.get_all())
Exemplo n.º 2
0
 def init_cls(cls, bridge: 'MessengerBridge') -> AsyncIterable[Awaitable[bool]]:
     cls.bridge = bridge
     cls.config = bridge.config
     cls.az = bridge.az
     cls.loop = bridge.loop
     cls._community_helper = CommunityHelper(cls.az)
     cls.temp_disconnect_notices = bridge.config["bridge.temporary_disconnect_notices"]
     return (user.load_session() async for user in cls.all_logged_in())
Exemplo n.º 3
0
def init(context: 'Context') -> Awaitable[None]:
    global config
    User.az, config, User.loop = context.core
    User._community_helper = CommunityHelper(User.az)
    return User.init_all()
Exemplo n.º 4
0
def init(context: 'Context') -> Iterable[Awaitable[bool]]:
    global config
    User.az, config, User.loop = context.core
    User._community_helper = CommunityHelper(User.az)
    return (user.load_session() for user in User.get_all())