✨ 添加更新好友群组与修复其他

This commit is contained in:
HibiKier
2024-08-12 22:26:13 +08:00
parent 66efc0cc72
commit 18f97b9bd5
14 changed files with 384 additions and 202 deletions
+3 -4
View File
@@ -123,13 +123,12 @@ class WordBank(Model):
# 对图片做额外处理
image_path = None
if word_type == 3:
_file = (
path / "problem" / f"{group_id}" / f"{user_id}_{int(time.time())}.jpg"
)
_uuid = uuid.uuid1()
_file = path / "problem" / f"{group_id}" / f"{user_id}_{_uuid}.jpg"
_file.parent.mkdir(exist_ok=True, parents=True)
await AsyncHttpx.download_file(problem, _file)
problem = get_img_hash(_file)
image_path = f"problem/{group_id}/{user_id}_{int(time.time())}.jpg"
image_path = f"problem/{group_id}/{user_id}_{_uuid}.jpg"
new_answer, placeholder_list = await cls._answer2format(
answer, user_id, group_id
)