The command exited with code 0. Output: 1404: async def _handle_menu_action(self, ws: Workspace, text: str) -> None: 1405- user_id = ws.user_id 1406- 1407- if text in ("🔐 Login Main Account", "🔐 Connect Telegram"): 1408- if text == "🔐 Login Main Account" and not self.is_admin(user_id): 1409- return 1410- if text == "🔐 Login Main Account": 1411- ws.session_base = str(LEGACY_SESSION_BASE) 1412- ws.state = "await_phone" 1413- self.save_workspace(ws) 1414- await self.send( 1415- user_id, 1416- fmt_msg("Telegram Login", "Please send the phone number for the account in international format (e.g., `+919876543210`).", success=False), 1417- keyboard=reply_kb(BACK_KB), 1418- ) 1419- return 1420- 1421- if text == "👥 All Users": 1422- if not self.is_admin(ws.user_id): 1423- return 1424- lines = [] 1425- for u_id in sorted(os.listdir(str(USERS_DIR))): 1426- if not u_id.endswith(".json"): 1427- continue 1428- u_id_clean = u_id.replace(".json", "") 1429- u_path = USERS_DIR / u_id 1430- try: 1431- udata = load_json(u_path) 1432- except Exception: 1433- continue 1434- groups = list((udata.get("saved_groups", {}) or {}).keys()) 1435- fbs = list((udata.get("saved_firebases", {}) or {}).keys()) 1436- fcms = list((udata.get("saved_fcms", {}) or {}).keys()) 1437- phone = udata.get("phone", "") or "—" 1438- if not groups and not fbs and not fcms: 1439- continue 1440- lines.append(f"{UI_SEP}") 1441- lines.append(f"👤 **User ID:** `{u_id_clean}`") 1442- lines.append(f"📞 **Phone:** `{phone}`") 1443- if groups: 1444- lines.append(f"📡 **Groups:** `{', '.join(groups)}`") 1445- if fbs: 1446- lines.append(f"🔥 **Firebases:** `{', '.join(fbs)}`") 1447- if fcms: 1448- fcm_details = [] 1449- for f_name, f_data in (udata.get("saved_fcms", {}) or {}).items(): 1450- aid = f_data.get("app_id", "?") if isinstance(f_data, dict) else "?" 1451- fcm_details.append(f"{f_name}({aid})") 1452- lines.append(f"🚀 **FCMs:** `{', '.join(fcm_details)}`") 1453- if not lines: 1454- await self.send(user_id, fmt_msg("No Users", "No configured users found.", error=True)) 1455- return 1456- lines.append(f"{UI_SEP}") 1457- await self.send(user_id, fmt_msg("All Users Config", "\n".join(lines), success=False), keyboard=self._workspace_menu(ws)) 1458- return 1459- 1460- if text == "🔐 FCM": 1461- fcm_status = "🟢 Active" if (ws.fcm_session_token and ws.active_mode == "fcm") else "🔴 Inactive" 1462- info = f"📱 **FCM Status:** {fcm_status}\n" 1463- if ws.active_fcm_name: 1464- info += f"🏷 **Active:** `{ws.active_fcm_name}`\n" 1465- if ws.fcm_app_id: 1466- info += f"🆔 **App ID:** `{ws.fcm_app_id}`\n" 1467- if ws.fcm_session_token: 1468- info += f"🔑 **Token:** `{ws.fcm_session_token[:16]}...`\n" 1469- if ws.saved_fcms: 1470- info += f"📦 **Saved:** {', '.join(ws.saved_fcms.keys())}\n" 1471- await self.send(user_id, fmt_msg("FCM Panel", info + "\nSelect an option below:", success=False), keyboard=self._workspace_fcm_menu(ws)) 1472- return 1473- 1474- if text == "🔥 Setup Firebase" or text == "/firebase": 1475- if not ws.saved_firebases: 1476- await self.send(user_id, fmt_msg("No Firebases", "No saved Firebases yet. Add one first using **➕ Add FB**.", error=True), keyboard=self._workspace_menu(ws)) 1477- return 1478- ws.state = "await_select_fb" 1479- self.save_workspace(ws) 1480- keyboard = [[f"🔥 FB: {name}"] for name in ws.saved_firebases.keys()] 1481- keyboard.append(["🔙 Back to Menu"]) 1482- await self.send(user_id, fmt_msg("Select Firebase", "Choose a saved Firebase from below:", success=False), keyboard=reply_kb(keyboard)) 1483- return 1484- 1485- if text == "➕ Add FB": 1486- ws.state = "await_new_fb_name" 1487- self.save_workspace(ws) 1488- await self.send(user_id, fmt_msg("Add Firebase", "Enter a short Firebase name:", success=False), keyboard=reply_kb(BACK_KB)) 1489- return 1490- 1491- if text == "🗑 Del FB": 1492- if not ws.saved_firebases: 1493- await self.send(user_id, fmt_msg("Nothing to Delete", "No saved Firebases to delete.", error=True), keyboard=self._workspace_menu(ws)) 1494- return 1495- ws.state = "await_del_fb" 1496- self.save_workspace(ws) 1497- keyboard = [[f"🗑 FB: {name}"] for name in ws.saved_firebases.keys()] 1498- keyboard.append(["🔙 Back to Menu"]) 1499- await self.send(user_id, fmt_msg("Delete Firebase", "Choose a Firebase to delete:", success=False), keyboard=reply_kb(keyboard)) 1500- return 1501- 1502- if text == "📡 Select Group": 1503- if not ws.saved_groups: 1504- await self.send(user_id, fmt_msg("No Groups", "No saved Groups yet. Add one first using **➕ Add Group**.", error=True), keyboard=self._workspace_menu(ws))