INNER CODE UNIT · Python
setup
GHJJ123/brainrotguard · main.py:52
async def setup(self) -> None:
"""Initialize all components."""
db_path = self.config.database.path
os.makedirs(os.path.dirname(db_path) or ".", exist_ok=True)
self.video_store = VideoStore(db_path=db_path)
logger.info("Database initialized")
# Bootstrap default profile from config on first run
self._bootstrap_profiles()
if self.config.telegram.bot_token and self.config.telegram.admin_chat_id:
self.bot = BrainRotGuardBot(
bot_token=self.config.telegram.bot_token,
admin_chat_id=self.config.telegram.admin_chat_id,
video_store=self.video_store,
config=self.config,
starter_channels_path=Path(__file__).parent / "starter-channels.yaml",
)