Created At: 2026-11-19T08:50:18Z Completed At: 2026-11-19T08:50:19Z Command exited with code 0. Command output: 637: async def is_trigger_allowed(self, bot_id: uuid.UUID, module_id: str, trigger_type: str) -> bool: 638- """ 639- Validates if a specific trigger ('command', 'inline_button', 'menu_button') 640- is permitted for this module. Requires module to be installed, active AND trigger enabled. 641- """ 642- stmt = select(BotModule).where( 643- and_(BotModule.bot_id == bot_id, BotModule.module_id == module_id) 644- ) 645- res = await self.db.execute(stmt) 646- mod = res.scalar_one_or_none() 647- if not mod or not mod.is_enabled: 648- return False 649- 650- if trigger_type == "command": 651- return bool(mod.enable_command) 652- elif trigger_type == "inline_button": 653- return bool(mod.enable_inline_button) 654- elif trigger_type == "menu_button": 655- return bool(mod.enable_menu_button) 656- return True 657- 658- async def build_dynamic_reply_menu(self, bot_id: uuid.UUID) -> Optional[dict[str, Any]]: 659- """ 660- Constructs a persistent Telegram ReplyKeyboardMarkup containing only 661- the menu buttons for modules where `is_enabled=True` AND `enable_menu_button=True`. 662- """