From 6ec643e9d1af848a4b998d25c239cbeb65b0b9c9 Mon Sep 17 00:00:00 2001 From: Raven95676 Date: Wed, 30 Apr 2025 00:51:49 +0800 Subject: [PATCH] fix: add self.lock --- astrbot/core/platform/sources/gewechat/client.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/astrbot/core/platform/sources/gewechat/client.py b/astrbot/core/platform/sources/gewechat/client.py index 0256afcee..59b4cc195 100644 --- a/astrbot/core/platform/sources/gewechat/client.py +++ b/astrbot/core/platform/sources/gewechat/client.py @@ -85,6 +85,8 @@ class SimpleGewechatClient: self.staged_files = {} """存储了允许外部访问的文件列表。auth_token: file_path。通过 register_file 方法注册。""" + self.lock = asyncio.Lock() + async def get_token_id(self): """获取 Gewechat Token。""" async with aiohttp.ClientSession() as session: