Command exited with code 0. Command output: 485- async def _restart_bot_client(self) -> None: 486- if self._bot_restarting: 487- return 488- self._bot_restarting = True 489- try: 490: log("[bot recovery] Bot client reconnect/restart triggered...") 491- if self.bot: 492- try: 493- await self.bot.stop() 494- except Exception: 495- pass -- 502- in_memory=True, 503- sleep_threshold=10, 504- ) 505- self.bot.add_handler(MessageHandler(self._handle_bot_message)) 506- await self.bot.start() 507: log("[bot recovery] Bot client restarted and listening successfully!") 508- except Exception as exc: 509: log(f"[bot recovery] Failed to restart bot client: {exc}") 510- finally: 511- self._bot_restarting = False 512- 513- async def _watchdog_loop(self) -> None: 514- while True: -- 544- log(f"User {target} has blocked the bot. Skipping.") 545- return None 546- except Exception as exc: 547- err_str = str(exc).lower() 548- if "the handler is closed" in err_str or "tcptransport closed" in err_str or "connection lost" in err_str: 549: log(f"Pyrogram transport failure detected ({exc}). Triggering bot recovery...") 550- asyncio.create_task(self._restart_bot_client()) 551- elif "timeout" in err_str or "connection" in err_str or "socket" in err_str: 552- log(f"Pyrogram send_message to {target} raised network error ({exc}). Skipping fallback to prevent duplicate.") 553- return None 554- log(f"Pyrogram send_message to {target} failed: {exc}. Trying HTTP Bot API fallback...")