From cd85fccedfa9588c473c3b4ee0317208ce98065a Mon Sep 17 00:00:00 2001 From: EillesWan Date: Tue, 23 Jul 2024 23:44:24 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=98=82=E4=BF=AE=E5=A4=8D=E4=BA=86?= =?UTF-8?q?=E7=82=B9=E6=95=B0=E8=87=AA=E5=8A=A8=E9=87=8D=E7=BD=AE=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plugins/liteyuki_status/status.py | 23 +++++++++++++++++-- .../trimo_plugin_msctconverter/msctexec.py | 5 ++-- .../vanilla_language/lang/zh-CN.lang | 2 +- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/src/plugins/liteyuki_status/status.py b/src/plugins/liteyuki_status/status.py index 514a52e..3b11fef 100644 --- a/src/plugins/liteyuki_status/status.py +++ b/src/plugins/liteyuki_status/status.py @@ -70,8 +70,8 @@ yanlun_path = ( ) -# 每天1点更新 -@scheduler.scheduled_job("cron", hour=1) +# 每天4点更新 +@scheduler.scheduled_job("cron", hour=4) async def every_day_update(): ulang = Language(get_default_lang_code(), "zh-WY") nonebot.logger.success(ulang.get("yanlun.refresh.success", COUNT=update_yanlun())) @@ -282,3 +282,22 @@ async def _( if (iill := int(final_length)) == final_length else await yanlun.finish(UniMessage.text(ulang.get("yanlun.length.float"))) ) + + +time_query = on_alconna( + command=Alconna( + "时间", + ), + aliases={"时间查询", "timeq", "timequery"}, +) + + +@time_query.handle() +async def _( + event: T_MessageEvent, + bot: T_Bot, +): + # ulang = get_user_lang(event_utils.get_user_id(event)) # type: ignore + await time_query.finish( + UniMessage.text(zhDateTime.DateTime.now().to_lunar().hanzify()) + ) diff --git a/src/plugins/trimo_plugin_msctconverter/msctexec.py b/src/plugins/trimo_plugin_msctconverter/msctexec.py index a04eca1..b9aaff5 100644 --- a/src/plugins/trimo_plugin_msctconverter/msctexec.py +++ b/src/plugins/trimo_plugin_msctconverter/msctexec.py @@ -180,7 +180,7 @@ def query_convert_points( return store, people_convert_point[usr_id][item]["point"] -# 每天1点更新 +# 每天4点更新 @scheduler.scheduled_job("cron", hour=4) async def every_day_update(): # ulang = Language(get_default_lang_code(), "zh-WY") @@ -238,8 +238,7 @@ async def _(): except: pass - if qqid in people_convert_point: - del people_convert_point[qqid] + query_convert_points(qqid,"music",0,False) filesaves[qqid]["totalSize"] -= filesaves[qqid][name]["size"] nonebot.logger.info( "\t删除{}".format(name), diff --git a/src/resources/vanilla_language/lang/zh-CN.lang b/src/resources/vanilla_language/lang/zh-CN.lang index aa964d6..bf93aa6 100644 --- a/src/resources/vanilla_language/lang/zh-CN.lang +++ b/src/resources/vanilla_language/lang/zh-CN.lang @@ -166,4 +166,4 @@ yanlun.count.head=出处ttt数量(占比) yanlun.count.tail=...(共 {NUM} 条) yanlun.length.toolong=言·论过长 yanlun.length.tooshort=言·论过短 -yanlun.length.float=言·论不可是非整数长度 \ No newline at end of file +yanlun.length.float=言·论不可是非整数长度