This commit is contained in:
SengokuCola
2025-06-25 21:31:35 +08:00
2 changed files with 7 additions and 5 deletions

View File

@@ -309,7 +309,11 @@ async def clear_temp_emoji() -> None:
logger.info("[清理] 开始清理缓存...")
for need_clear in (os.path.join(BASE_DIR, "emoji"), os.path.join(BASE_DIR, "image"), os.path.join(BASE_DIR, "images")):
for need_clear in (
os.path.join(BASE_DIR, "emoji"),
os.path.join(BASE_DIR, "image"),
os.path.join(BASE_DIR, "images"),
):
if os.path.exists(need_clear):
files = os.listdir(need_clear)
# 如果文件数超过100就全部删除

View File

@@ -148,9 +148,7 @@ class ExpressionSelector:
expr["count"] = new_count
expr["last_active_time"] = time.time()
logger.info(
f"表达方式激活: 原count={current_count:.2f}, 增量={increment}, 新count={new_count:.2f}"
)
logger.info(f"表达方式激活: 原count={current_count:.2f}, 增量={increment}, 新count={new_count:.2f}")
break
# 保存更新后的文件