Command exited with code 0. Command output: return True if "FB Backup" in text: return True return False async def send(self, chat_id: str | int, text: str, keyboard: Optional[Any] = None): if not self.bot: return None target = int(chat_id) if str(chat_id).lstrip("-").isdigit() else chat_id try: return await self.bot.send_message(target, text, reply_markup=keyboard) except UserIsBlocked: log(f"User {target} has blocked the bot. Skipping.") return None except Exception as exc: err_str = str(exc).lower() if "timeout" in err_str or "connection" in err_str or "socket" in err_str: log(f"Pyrogram send_message to {target} raised network error ({exc}). Skipping fallback to prevent duplicate.") return None log(f"Pyrogram send_message to {target} failed: {exc}. Trying HTTP Bot API fallback...") if self.http and self.bot_token: try: bot_url = f"https://api.telegram.org/bot{self.bot_token}/sendMessage" payload = { "chat_id": target, "text": text, "parse_mode": "Markdown" } async with self.http.post(bot_url, json=payload, timeout=10) as resp: if resp.status == 200: log(f"Successfully sent message to {target} via HTTP Bot API fallback.") return True else: res_body = await resp.text() log(f"HTTP Bot API fallback status {resp.status}: {res_body}") except Exception as http_err: log(f"HTTP Bot API fallback failed: {http_err}") return None async def send_menu(self, ws: Workspace, text: str = "👋 Menu:") -> None: await self.send(ws.user_id, text, keyboard=self._workspace_menu(ws)) async def log_private(self, user_id: str, text: str) -> None: try: await self.send(user_id, f"📝 **LOG:** {text}") except Exception as exc: