mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-10-04 03:10:01 +08:00
fit nonebot.beta2
This commit is contained in:
@@ -32,14 +32,14 @@ async def init():
|
||||
|
||||
def read_data(file_name: str):
|
||||
try:
|
||||
with open(DATA_PATH + file_name, "r", encoding="utf8") as f:
|
||||
with open(DATA_PATH / file_name, "r", encoding="utf8") as f:
|
||||
return json.load(f)
|
||||
except (ValueError, FileNotFoundError):
|
||||
return {}
|
||||
|
||||
|
||||
def save_data():
|
||||
with open(DATA_PATH + "group_last_chat_time.json", "w") as f:
|
||||
with open(DATA_PATH / "group_last_chat_time.json", "w") as f:
|
||||
json.dump(time_data, f, indent=4)
|
||||
logger.info(
|
||||
f'自动存储 group_last_chat_time.json 时间:{str(datetime.now()).split(".")[0]}'
|
||||
|
||||
Reference in New Issue
Block a user