✨ 新增在线查漏补缺功能

This commit is contained in:
2025-06-29 01:45:24 +08:00
parent ca6a414ba4
commit c6f24bc3c2
72 changed files with 807 additions and 208 deletions
+11 -4
View File
@@ -9,6 +9,7 @@ from zhenxun.utils.message import MessageUtils
from .command import diuse_farm, diuse_register, reclamation
from .database.database import g_pSqlManager
from .dbService import g_pDBService
from .event.event import g_pEventManager
from .farm.farm import g_pFarmManager
from .farm.shop import g_pShopManager
from .json import g_pJsonManager
@@ -22,6 +23,7 @@ __plugin_meta__ = PluginMetadata(
指令:
at 开通农场
我的农场
农场详述
我的农场币
种子商店 [筛选关键字] [页数] or [页数]
购买种子 [作物/种子名称] [数量]
@@ -36,10 +38,11 @@ __plugin_meta__ = PluginMetadata(
购买农场币 [数量] 数量为消耗金币的数量
更改农场名 [新农场名]
农场签到
土地升级 [地块ID](通过农场详述获取)
""".strip(),
extra=PluginExtraData(
author="Art_Sakura",
version="1.4.3",
version="1.5.0",
commands=[Command(command="我的农场")],
menu_type="群内小游戏",
configs=[
@@ -84,6 +87,9 @@ async def start():
await g_pDBService.init()
# 检查作物文件是否缺失 or 更新
await g_pRequestManager.initPlantDBFile()
# 析构函数
@driver.on_shutdown
@@ -93,9 +99,10 @@ async def shutdown():
await g_pDBService.cleanup()
@scheduler.scheduled_job(trigger="cron", hour=0, minute=30, id="signInFile")
@scheduler.scheduled_job(trigger="cron", hour=4, minute=30, id="signInFile")
async def signInFile():
try:
await g_pJsonManager.initSignInFile()
except:
logger.info("农场签到文件下载失败!")
await g_pRequestManager.initPlantDBFile()
except Exception as e:
logger.error("农场定时检查出错", e=e)