perf: hint

This commit is contained in:
Soulter
2024-12-14 23:24:18 +08:00
parent 990390218c
commit 401747a7a3
2 changed files with 5 additions and 0 deletions
+1
View File
@@ -74,6 +74,7 @@ class AstrBotCoreLifecycle:
async def start(self):
self._load()
logger.info("AstrBot 启动完成。")
await asyncio.gather(*self.curr_tasks, return_exceptions=True)
async def stop(self):
@@ -100,6 +100,10 @@ class AiocqhttpAdapter(Platform):
abm = self.convert_message(event)
if abm:
await self.handle_msg(abm)
@self.bot.on_websocket_connection
def on_websocket_connection(_):
logger.info("aiocqhttp 适配器已连接。")
bot = self.bot.run_task(host=self.host, port=int(self.port), shutdown_trigger=self.shutdown_trigger_placeholder)