Created At: 2026-11-19T09:08:40Z Completed At: 2026-11-19T09:08:41Z Command exited with code 0. Command output: 907- res = await self.db.execute(stmt) 908- enabled = res.scalar_one_or_none() 909- return bool(enabled) 910- 911- async def get_module_config(self, bot_id: uuid.UUID, module_id: str) -> dict[str, Any]: 912- """Retrieves active configuration for a module, or default if unset.""" 913- stmt = select(BotModule.config).where( 914- and_(BotModule.bot_id == bot_id, BotModule.module_id == module_id) 915- ) 916- res = await self.db.execute(stmt) 917- cfg = res.scalar_one_or_none() 918- if cfg: 919- return cfg 920- meta = CORE_MODULE_DEFINITIONS.get(module_id) 921- return meta["default_config"] if meta else {} 922- 923- # -------------------------------------------------------------------------- 924- # REAL RUNTIME EXECUTION HANDLERS 925- # -------------------------------------------------------------------------- 926- 927: async def check_force_join( 928- self, 929- bot_id: uuid.UUID, 930- raw_token: str, 931- user_id: int, 932- ) -> tuple[bool, Optional[dict[str, Any]]]: 933- """ 934- Executes Force Join check if force_join module is active. 935- Returns: (is_allowed, prompt_payload_if_blocked) 936- """ 937- if not await self.is_module_active(bot_id, "force_join"): 938- return True, None 939- 940- config = await self.get_module_config(bot_id, "force_join") 941- channel_target = str(config.get("channel_username") or config.get("channel_id") or "").strip() 942- if not channel_target: 943- return True, None 944- 945- # Normalize target for Telegram API (extract @username if URL was provided) 946- api_chat_id = channel_target 947- if "t.me/" in api_chat_id: