INNER CODE UNIT · Python
time_limit_cb
GHJJ123/brainrotguard · main.py:80
async def time_limit_cb(used_min: float, limit_min: int,
category: str = "", profile_id: str = "default"):
if self.bot:
await self.bot.notify_time_limit_reached(
used_min, limit_min, category, profile_id=profile_id)
state = fastapi_app.state
state.video_store = self.video_store
state.notify_callback = notify_callback
state.time_limit_notify_cb = time_limit_cb
state.youtube_config = self.config.youtube
state.web_config = self.config.web
state.wl_config = self.config.watch_limits
state.locale = get_locale(self.config)
state.time_format = get_time_format(self.config)
if state.wl_config:
state.wl_config.locale = state.locale
state.wl_config.time_format = state.time_format