diff --git a/nonebot/adapters/qq/adapter.py b/nonebot/adapters/qq/adapter.py index 0dd3489..1b24216 100644 --- a/nonebot/adapters/qq/adapter.py +++ b/nonebot/adapters/qq/adapter.py @@ -199,7 +199,8 @@ async def _forward_ws(self, bot: Bot, ws_url: URL, shard: Tuple[int, int]) -> No if heartbeat_task: heartbeat_task.cancel() heartbeat_task = None - self.bot_disconnect(bot) + if bot.self_id in self.bots: + self.bot_disconnect(bot) except Exception as e: log(